Lookup in Update Query

newone

Registered User.
Local time
Today, 08:37
Joined
Mar 8, 2001
Messages
15
I have an update query, (updates "Table1") with a field that I would like to be able to lookup data from another table (Table2.) I would like the user to be prompted when running the query and to be able to use a list to choose the correct response from "Table2" which will then update "Table1" with this response. Is this possible without using a form?
 
What do you mean--that you want all fields in the query updated the same way depending on an initial choice the user makes, or that you want the user to be able to choose for each entry? In either case, I don't think it's possible to create pop-up list boxes using queries, so you either need a form or you can use one of these alternatives:

If you want all entries in Table1 updated to the same user-defined value, then in the "Update To" field put something like [Value you want to update to:] - this will prompt the user with whatever message you put in the brackets, and will then update with whatever value they enter.

Or, if you really want a list of options for the user, you could make it a two-step process. Make a table (we'll say Table3) with just one field, and make that field a List or Combo Box (under the "Lookup" tab in design view), linking it to the list in Table two. Now make just one record, and that can be your update source. The user will need to edit the table before each update, but at least they'll get a drop-down list of options.

If you want the user to be able to choose a value for each record in Table1, then you can
simply make the field within Table1 a lookup field (as in the other method above), and have the user edit Table1 directly.
 

Users who are viewing this thread

Back
Top Bottom