Results 1 to 3 of 3
  1. #1
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376

    DLookup Issues

    Ok Folks,

    I am sure this will be quicker to answer than it was to type this out. I am new to the DLookUp function and can't get it to work correctly ( in fact-doesn't work at all).

    I am trying to populate a txt field upon a form loading with VBA using the following statement.

    Me.TxtOrgName = DLookup("OrgName", "tblSettings", "TxtOrgName='string'")

    What am I missing, I haven't used DLookup before so I am sure it is something simple I'm missing.



    Thanks

    Dave

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    You have OrgName value of "string"? The DLookup is looking for literal text "string". Why do you even need to save organization's name to this table? What is database structure? If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    June7,

    I hope to be able to put this out to other users and the settings table allows others to be able to put in their own unique data.

    I did get this working by putting the DLookUp function in the "Control Source" in the properties and fixing the format and requirement of the string.

    Thanks

    Dave

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Trying something new and having issues
    By Dave14867 in forum Access
    Replies: 2
    Last Post: 04-03-2019, 03:03 AM
  2. I think I have trust issues!
    By Kaloyanides in forum Security
    Replies: 3
    Last Post: 03-21-2019, 09:25 AM
  3. Many to Many Issues
    By chrisdogg in forum Forms
    Replies: 5
    Last Post: 01-11-2017, 05:26 PM
  4. Shortening if / dlookup >0 / then dlookup
    By Jack Russel in forum Modules
    Replies: 1
    Last Post: 02-19-2016, 03:01 PM
  5. DLookup issues...
    By Fish218 in forum Forms
    Replies: 2
    Last Post: 03-09-2012, 11:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums