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

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 and the OK button is clicked, it is displayed on a designated form.
so far this code below doesn’t seem to work,

[docmd.openform "frmFormName",,,"lngPrimaryKey=" & me!txtPrimaryKey]

When I use the code I get this error – runtime error ‘3075’
Syntax error (missing operator) in query expression [organisation] = N19 5QG

I have three tables: - TblOrganisation, Tblprojects & Tblprovision

Primary keys are: OrganisationID & ProjectID
One form called Organisation with two subforms, Projects & provision.
A search dialog form called Search

Thanks in advance.
 
Hallo,

The problem the error is referring to is that you are missing quotes around the N19 5QG value.
This will probably be something on the form you are opening in the OpenForm command. Maybe the RecordSource or RowSource of a ComboBox

- Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top