Results 1 to 9 of 9
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    C-Formatting Datasheet (A2k)

    As the attached PNG , can I set a DLookup to check the following:

    Look up in table "Parts-Orders" whether it contains any records for the results of EstNo(Field) which has the same result.

    So, When sbfWIP2 loads, the condition expression checks table "Parts-Orders" for a matching EstNo
    I'm struggling with the syntax.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: C-Formatting Datasheet (A2k)

    Try
    <code>
    DCount("*","Parts-Orders","EstNo=" & [EstNo])>0
    </code>
    The condition will be True if DCount is greater than 0, i.e. if there are matching records. If you'd rather check that there are no matching record, change > to =.

    The above assumes that EstNo is a number. If it is text, use <code>"EstNo=" & Chr(34) & [EstNo] & Chr(34)</code>

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: C-Formatting Datasheet (A2k)

    Hans

    I applied the new condition, and it works fine.
    It's a bit slow because of the amount of records it is dealing with.

    When I check the speed, it seems your reply was quicker than it took the condition to apply ! <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

    If there's a quicker way, I would be very interested , Tick Tock !!

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: C-Formatting Datasheet (A2k)

    You could try
    <code>
    Not IsNull(DLookup("*","Parts-Orders","EstNo=" & [EstNo]))
    </code>
    or
    <code>
    IsNull(DLookup("*","Parts-Orders","EstNo=" & [EstNo]))
    </code>
    depending on which check you want to perform, but I doubt it will make much difference.

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: C-Formatting Datasheet (A2k)

    Thank you Hans


    Your reply was even quicker, ( Not been messing with the server time I hope) I'll give it a go.

    BTW
    Have a great Easter Weekend

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: C-Formatting Datasheet (A2k)

    Dave,

    Have a good Easter weekend too!

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Pennsylvania, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: C-Formatting Datasheet (A2k)

    My goodness HanV

    Looks like you need to get some sleep.
    threecrow

    Don&#39;t make excuses. It&#39;s what you do, not why you didn&#39;t.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: C-Formatting Datasheet (A2k)

    Don't you like my Maintainer suit? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  9. #9
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Pennsylvania, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: C-Formatting Datasheet (A2k)

    It's very nice

    You'll stand out in the Easter parade
    threecrow

    Don&#39;t make excuses. It&#39;s what you do, not why you didn&#39;t.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •