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

Type mismatch error 1

Status
Not open for further replies.

fdalmoro

IS-IT--Management
May 8, 2003
90
US
I get a type mismatch when I implemented this code;

Code:
stLinkCriteria = "[TECH_ASSIGNED]=" & "'" & Me![OPEN_WO_LIST] & "'" And "[STATUS]=" & "'" & "Pending" Or "[STATUS]=" & "'" & "In Progress"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

What this is doing is that there is a list box on the form displaying the names of certain Technicians. When you click on any of the names, it pulls up in another form only the WO calls that have their names in it. I think the problem is somewhere in the stLinkCriteria after the And because that's the part that I recently changed. I'm not sure if that's the way to tell it to only display the rows that have "Pending" or "In Progress" in the Status field.

thanks
 
You may find this works...

stLinkCriteria = "[TECH_ASSIGNED]= '" & Me![OPEN_WO_LIST] & "' And ([STATUS]='Pending' Or [STATUS]= 'In Progress')"


There are two ways to write error-free programs; only the third one works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top