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!

Open form criteria 2

Status
Not open for further replies.

mayday999

Technical User
Nov 20, 2006
17
US
Hi all,

I have code to open a form and I am trying to pass two criteria to open the form. I keep getting syntax errors. here is my link criteria:

stLinkCriteria = [("[Site_ID]=" & Me![Site_ID]) And ("[AssessmentID]=" & Me![List38])]

Can anyone help with this?

TIA

D
 
Perhaps simply this ?
stLinkCriteria = "Site_ID=" & Me!Site_ID & " AND AssessmentID=" & Me!List38

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
If both Site_ID and AssessmentID are numeric, this should work:

"[Site_ID]=" & Me.Site_ID & " And [AssessmentID]=" & Me.List38

If say Site_ID is text and AssessmentID is numeric:


"[Site_ID]='" & Me.Site_ID & "' And [AssessmentID]=" & Me.List38

Let them hate - so long as they fear... Lucius Accius
 
well damn im slow...

Let them hate - so long as they fear... Lucius Accius
 
Thanks PHV,

Went a little crazy with the brackets and quotes...lol
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top