Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,235
    Thanks
    202
    Thanked 796 Times in 729 Posts
    Rob,

    That is correct! Have you move the code to the ComboBox controls AfterUpdate event?

    BTW: I forgot to mention that if you are checking on a name field you could have problems if you have more than one person with the same name. As I understand it DLookup will only find the 1st matching record in the DB.

    Here's the reference notice the limitation under the Remarks section. HTH
    Last edited by RetiredGeek; 2014-02-12 at 10:08.
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  2. #17
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks for that. No matter what I tried, I couldn't get it to work. Ended up adding the SIA number to the combo box, which apparently will do. Thanks for your assistance. I have another question relating to this database, which I will post in another thread.

  3. #18
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Manchester, United Kingdom
    Posts
    113
    Thanks
    8
    Thanked 15 Times in 14 Posts
    I know this is an old thread but...

    Everyone is fixed on the "empty" field being NULL, but what if it is just blank? Testing for nz(dlookup(...), '') = '' (count those quotes) instead of isnull(dlookup(...)) might be what you needed.

    Ian.

  4. #19
    Lounger
    Join Date
    Feb 2011
    Posts
    43
    Thanks
    0
    Thanked 6 Times in 6 Posts
    If FORMNAME is a text field you need to use
    "[FORNAME] = " & chr(34) & Me!FORENAME & chr(34)))

Page 2 of 2 FirstFirst 12

Posting Permissions

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