stLinkCriteria syntax help

Jon Henry

Registered User.
Local time
Today, 05:35
Joined
Jun 1, 2008
Messages
20
Im trying to setup a form with a listbox. I want to be able to double-click on an item in the listbox and open up a form (frmIndServReq) with the selected record according to the address that was highlighted in the listbox. Im working with this but am having no luck. The address is text, not numbers.


DoCmd.OpenForm "frmIndServReq", , , "[ServReq Query.Address] ='" & "'" & Me.lstServReq.Column(1) & "'"



Any suggestions?
 
Ahh looks like I have an extra ampersand and quote set. I shall have to remove those. I will eb back at that pc tommorrow afternoon to try it out.

Thank You pbaldy
 
I tried it but still have a problem, Im getting a 'syntax error in server query expression'[frmIndServReq]![txtAddress]='130 Normandy Road"

Am I formatting the stuff before the equals sign correctly?

I also tried this [Serv Req Query.Address].

Any ideas?
 
Is your stringwhere something like this now:
"[ServReq Query.Address] = '" & Me.lstServReq.Column(1) & "'"

This should work IF there isen't any records with names like "O'Brian street"

If there is you could try : """ & me.lstServerReq.Column(1) & """"

JR


 
What exactly is your code now?
 

Users who are viewing this thread

Back
Top Bottom