Autofill Textbox based on Input

BradBrad

Registered User.
Local time
Today, 11:44
Joined
May 27, 2011
Messages
23
Hi, I'm trying to basically create something that when a 6 digit number is typed into the combo box, it will pull information from another table and auto populate the record in the database.

IE:

I type in 90210 and in another table, it says California and populates the form.

Any advice on how to achieve this?
 
First off, let's clarify a few things -

1. Are you using lookups at table level? If so, you should reconsider - read this as to why you shouldn't use them at table level but only at form level.

2. Are you using a form or are you trying to do this directly in the table?
 
@pbaldy - I'll give this a shot... looks like exactly what I need.

@boblarson - I'm using a form to save information to a table, then running queries on it which require the autofilled information.
 
@boblarson - I'm using a form to save information to a table, then running queries on it which require the autofilled information.

Okay, good - it wasn't sounding like that from your description (at least the way I read it) so I wanted to make sure before going on. Looks like Paul read it correctly and had posted faster as well. :)
 
Alright I think I've gotten something here, could you elaborate on how I could hook this up to the initial text box?

Code:
 SELECT Departments.[Department Name]
FROM [Absenteeism 2011] AS [Absenteeism 2011_1], Departments INNER JOIN [Absenteeism 2011] ON Departments.[Department Name] = [Absenteeism 2011].Department;
 
If that's the row source of the combo, I would expect it to have the second field that you want. Given your original example, the row source would include the 6 digit number field and the state field. Unless I've misunderstood what you're trying to do.
 

Users who are viewing this thread

Back
Top Bottom