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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling only part of the recordsource with a query

Status
Not open for further replies.

storl2

Programmer
Jun 3, 2004
47
US
If this is already answered in another post, please point me to it.

I'm new to Access 97 and VBA, so I'm not sure how some things work.

I have a form with about 20 or so text boxes on the lower part, and a combo box and command button on the top. The combo box lists all users and their ID's by searching an employee table, and the command button searches the employee table (in another database) according to the user ID in the combo box. I want it to populate about 10 of the text boxes, and leave the others blank, but when I set the recordsource by the ID in the combo box, it of course populates all boxes on the form and puts #Name? in the text boxes that aren't part of the query. Is there a way to make it populate only the text boxes that I want? Am I going about this the completely wrong way by using recordsources when there is a much more simple way to do it? Thanks for any help that anyone can give me.
 
Ok, I think I have an idea on how to do this. What if I had the combo box and command button on one form, and actual text boxed on another form? I could have a query that makes the recordsource of the parent form the information from the employee table, and have the command button execute that and update the subform with only the information that I want. Of course, I have no idea how to do that. Any suggestions?
 
Take a look at the FAQ area of this forum. An entire section is devoted to combo.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top