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!

Form to pull data that matches value in field not shown

Status
Not open for further replies.

DWH

Technical User
May 2, 2001
3
US
This one confuses me a bunch. I hope I can make this understandable.

I have a form that shows customers, with lots of info about them. I want to open it, run the "find" command, and lookup the customer by a customer ID number. The problem is that some customers use just one customer ID number, and others have multiple numbers, with one designated a "master" number. I created a "bridge" table that shows all the customer numbers, and the "master" numbers (and where there's no master number, the "master" field shows the actual customer number.)

My question - how do I "find" the customer by customer ID - when what shows in the form is the "master" number?

Thanks for any hints you can give me.

Darlene
 
I would have two subforms
One shows all customers all numbers.

Then when you find the one you want
click it and that will pass information to a second subform to get just that particular customer.

so in the first subforms "ON Click" Event you would have

Forms![mainformname]![secondsubformname].form.Recordsource = "Select * From yourTable Where Somefield = '" & forms![mainformname]![Fisrtsubformname].form!fieldname

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top