Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mutiple Query and one text box

Status
Not open for further replies.

Krash878

Programmer
May 8, 2001
172
US
I have a form with a sub form.

The form has a textbox (unbound) and an option group.

I have 6 queries that are identical except that in the criteria is linked to my text box.

The option group says which query to run.

The main Form has a sub form that displays all the data in my table in design view.

I need another text box to populate with the ID from the selected record from the query run.

Thus being able to highlight a record in the sub form for more commands.

So the question is how can I get one text box to display what the ID of the record in the selected query.
 
Try this...

In the subform's On Current event put a reference to the text box on the main form and set it equal to the ID number on the subform. The VBA syntax would be:

Forms![MainFormName]![TextBoxName] = IDNumberField

ljprodev@yahoo.com
ProDev
MS Access Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top