opening forms via switchboard changes outcome

C

cporter

I have a form that accesses the query below. When opened by clicking on
the query in the database directory it works by opening a small dialog
box asking for the machine ID. When opened using the switchboard it
doesn't ask for the machine id. Why is there a difference and how do I
work around it?


SELECT EQUIP.MACHID, EQUIP.DESCRIP, EQUIP.MFG, EQUIP.MODEL,
EQUIP.SERNO, EQUIP.LOCATION, Left$([machid],3) AS Prefix,
EQUIP.ORIGCOST, EQUIP.SERVDATE, EQUIP.ASSETNO
FROM EQUIP
WHERE (((EQUIP.MACHID)=[enter machine ID]) AND ((EQUIP.SERVFLAG)="y"))
ORDER BY EQUIP.MACHID;
 
C

Col

One workaround is to put a textbox on the switchboard. Enter the machine id
there before calling the query.
Change the query where to
WHERE (((EQUIP.MACHID)=[" & Forms![switchboardformname]![textboxname] &
"]) AND ((EQUIP.SERVFLAG)="y"))
 
C

Col

WHERE (((EQUIP.MACHID)='" & Forms![switchboardformname]![textboxname] &
"') AND ((EQUIP.SERVFLAG)="y"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top