Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2013

    Unanswered: Need Help Auto-Completing Data on Form

    Hi everyone,

    I've created a simple Access form for user input. My database is a single table containing the employer number and name.

    My boss wants the screen to let the user enter in the employer number and then the corresponding name is automatically displayed on the screen.

    I can't find a way to do this. I was able to get it to work using a combo box, but my boss doesn't like the user having to scroll through a list and find the employer number.

    I tried using a Make Table query to accept the user's input and store the record in a temp table. This worked until I assigned the temp table employer name to the form. THe query then completely that the temp table could not be deleted because it was locked to the form.

    My boss find a website talking about autolookup query, but I can't find a good tutorial or really see how that can work on a form. Can anyone help, or is this even possible?

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    Private Sub EmployerNumber_AfterUpdate()
        Me.EmployerName.Value = DLookup("EmployerName", "TableName", "EmployerNumber=" & Me.EmployerNumber)
    End Sub
    Replace the names I used here by those existing in your database.
    Have a nice day!

  3. #3
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    Quote Originally Posted by TWD39 View Post boss doesn't like the user having to scroll through a list and find the employer number...
    There's no need to 'scroll through a list!' The Auto Expand Property of the Combobox (which defaults to Yes) will move to the correct employee number as the user types it into the Combobox!

    Linq ;0)>
    Hope this helps!

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

    All posts/responses based on Access 2003/2007

Posting Permissions

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