View Full Version : select a table row source for a query


captnk
12-20-2001, 05:43 PM
I am trying to set up a query (very similar to a combobox query),except I want (if possible) to be able to select an item (Name) from a row in a table field.
I have it so it will now run but it finds everything in the queried table,not the selected field name.
I use a run code item from a macro and then a query,but clearly it is not inputting the row source as happens in a combo box
Any ideas pls

captnk
12-20-2001, 07:45 PM
Further to my earlier post,some progression has been made.
Using the following code I can now with a dble click get the query to open a dialogue box and when the name is inserted it does the correct query.

"[forms]![myfilename subform2]![myfieldname]![myfieldname_label]"

So has anyone got an idea whats missing here pls ??????

Pat Hartman
12-21-2001, 04:27 AM
In the where clause of the query, you should be referencing the name of a control on your subform such as:

[forms]![myfilename subform2].Form![myfieldname]

Once you get the field name right, the query will stop prompting you for input.

captnk
12-23-2001, 01:08 AM
Ok Folks :
I have got this working Thanks