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

Multiple fields on StLinkCriteria 1

Status
Not open for further replies.

Countymnca

Technical User
Jul 18, 2006
44
US
Hello,
A request has come in to modify an existing and working function that generates a report based on one text field on the form. Occasionally, there are 2 or more records that have the same text value [CustNumber]in this field, so multiple reports are created. I have been attempting to add another field [InvNumber] to the existing stLinkCriteria so that only one report will be generated. InvNumber is also text, but I am getting a Data mismatch error when I attempt to run it. What am I missing or can this not be done via this method?

stLinkCriteria = "[CustNumber]=" & "'" & Me![CustNumber] & "'" And "[InvNumber]=" & "'" & Me![InvNumber] & "'"

Both criteria work when seperate, so I know it is something to do with joining them together that I am missing.

All fields are text fields despite their names and are not combo boxes on the form.

 
Duane,
Thanks for the reply and solution. Works as it should.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top