opening forms via switchboard changes outcome

  • Thread starter Thread starter cporter
  • Start date Start date
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;
 
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"))
 
WHERE (((EQUIP.MACHID)='" & Forms![switchboardformname]![textboxname] &
"') AND ((EQUIP.SERVFLAG)="y"))
 
Back
Top