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

Populate Second Form Based On First Form

Status
Not open for further replies.

WickedElm

MIS
Jul 11, 2002
13
US
Hi there, I am trying to create two different forms that are to be used together...On the first form there is a text box, "txtnumber", where users enter a number to look up a certain record...when a button on the form is pushed, i want a second form to pop up with data corresponding to the record number they entered on the first form...an example...if they put in the number 007, then the second form's controls would be pointed to 007's record for things like "Name", "Address", etc...I can bring up the second form, but can't get it to point to the information entered on the first form...ANY help would be greatly appreciated....thanks!!!

boris
 
What I'll do sometimes is setup a combo box where the user enters the agent number on a simple form ... let's say I have 10 users using the same DB. There are 10 different forms to go to that have data populated for WHICHever agent is selected. So they load it up, chose their name from the combo box (or text box for that matter, but this leaves margin for user error), and then click whichever form they'd like to view.

Then I setup my forms to run off of a query. There is, of course, a matching agent number that matches a number from the previous form on each record in the table that this query is built off of. I set my query criteria for this agentnumber to the previous form .. IE: in the criteria box it reads: [Forms]![frmPreviewworkassignments]![AgentNum]

They push the button, the form runs being built off of this query, and they only see the records that correspond to the number entered in your text/combo box. I'm a spaz, I probably didn't explain well - I can always explain better if you need me to.
If you need more help, just ask. ALso, it might be wise to have an unbound text box on the forms that you open from the original form that links to the Forms![frmPreviewworkassignments]![AgentNum] so they can make sure that they selected the correct number... At the top somewhere out of the way.

-Josh ------------------
-JPeters
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top