Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2013

    Unanswered: Needing to Relearn Access

    I am having to relearn Access to address a data issue in my organization. Here is what I want to do: Set up a form for staff to enter employee license and certification information.

    I have set up a form and would like to have data specific to an employee (name, job code, job title, etc.) populate from an employee table off of the entry of the employee's ID number. I did this years ago but I cannot recall how to do it.

    Here is what I have been able to find so far in an internet search: DLookUp("[Last]","Employee List","[EEID]= "& Forms![EEID])

    My understanding is that I am asking for a Dlookup of the Last Name in the Employee List where the EEID (in the Employee List) equals the EEID on the Form. Still it isn't working. Is it the placement of the quotation marks at the end? Do I need the brackets?
    Last edited by CavGuy; 01-21-13 at 18:17.

  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    If EEID is defined as a Number:
    DLookUp("[Last]","Employee List","[EEID]= " & Me.EEID)
    If EEID is defined as Text:
    DLookUp("[Last]","Employee List","[EEID]= '" & Me.EEID & "'")

    But doing this for name, job code, job title, etc., especially that etc, could be kind of cumbersome! You'd probably do better to use a Combobox for the selecting the desired EEID, and leaving the heavy lifting to the Access Gnomes! Here's a short tutorial on doing this:


    If you haven't already done so, create a Form based on your Table or Query, including all the Fields you want displayed.

    Then simply:
    • Add a Combobox to your Form.
    • The Combobox Wizard will pop up
    • Select "Find a record based on the value I selected in my combobox."
    • From the Table or Query the Form is based on, click on the Field you're searching by (a Field that is unique for each Record) such as EEID, to move it to the right side.
    • Hit Next.
    • Size the column appropriately.
    • Hit Next.
    • Name the Combobox something appropriate.
    • Hit Finish.

    Now you can drop the Combobox down and scroll down to the appropriate EEID, or you can start to enter the EEID, and the Combobox will "autofill" as you type. Hit <Enter> and the Record will be retrieved.

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jan 2013

    Wow! Thanks!

    I have never done much with combo boxes but it does sound as though it is easier and less time consuming than Dlookup. I do have a lot of data I want to pull in automatically.

    I will give the combobox a try and let you know how it goes!

  4. #4
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Surrey, UK
    Provided Answers: 18
    If you don't mind getting your hands dirty (so to speak), you can make the combo box do more work than that. Combo boxes can hold and show more than one column, so you can control which column(s) get(s) seen by the user, and then use form events to drive the other values into text boxes.
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

Posting Permissions

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