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!

Searching a table

Status
Not open for further replies.

sstasiak

MIS
Feb 8, 2007
21
US
I have a table(tblOncReg) that contains a record number field(MedRecNo), last name(LNAME), and first name(FNAME).

I want to create a form with 3 text boxes that will accept a record number, last name, or first name, and search tblOncReg for associated records. The record should populate all fields in my main form(OncRegMain). A MedRecNo search will only yield 1 result as that is a primary key, so the main form should automatically populate. The last and first name search may return multiple records for people with the same last or first name. In that case, I'd like a form to open with a list of all matching records, with the ability to open the appropriate one.

Any ideas?
 
And what have you tried so far ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
After some research, I think the easiest way to find a record is using a combo box that looks at records in my main table.

I have another problem though. When I select the record from the combo box, and hit enter, I want my main form to open with all fields populated by the data associated with that selected record. Not sure how to do this.
 
PHV

I got a notification that you replied again, but don't see it here when I refreshed the link. Please repost.
 
Why not using the combo wizard (3rd option) ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Not sure how to accomplish what I'm looking to do with the wizard. Can you elaborate?

Remember, you're talking to a rookie here.

Thanks again
 
How are ya sstasiak . . .

[ol][li]Make a [blue]bound form[/blue] to the table.[/li]
[li]Using the combobox wizard put the combobox on the form header or footer and select the option: [blue]Find a record on my form based on the value I selected in my combo box.[/blue][/li]
[li]Test the combobox . . .[/li][/ol]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top