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

Ms Access Search problem 1

Status
Not open for further replies.

4808

Programmer
Jan 13, 2004
27
GB
i'm trying to create a search dialogue with an option box,a text box that shows option selected, an ok and cancel button. could someone help with a code for the OK button please, such that when a row is select from the text box it is displayed on a designated form.
thanks.
 
Hallo,

The code you probably want is something like:
Code:
docmd.openform "frmFormName",,,"lngPrimaryKey=" & me!txtPrimaryKey
This assumes that your text box is called txtPrimaryKey and contains a unique identifying number for the record to be displayed. frmFormName should have the table containing the records to be displayed as its recordsource.

- Frink

PS If you need more help, we'll need to know more info about your tables/fields and forms/controls
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top