Just need some help i have a pass through query updating a sql table. (See below at query)
SET SH_ORDERADJUST = 1
WHERE (((WATFORD_SHORT_PACK.SH_ORDERADJUST)=0 Or (WATFORD_SHORT_PACK.SH_ORDERADJUST) Is Null) AND (WATFORD_SHORT_PACK.SH_REF)=[Forms]![frmOrderReverse]![cboSON] Or [Forms]![frmOrderReverse]![cboSON] Is Null);
Am getting an error
ODBC - Call failed
[Microsoft][ODBC SQL Server Driver][SQL Server] Line 3: Incorrect syntax near '!', (#170)
I think it does not like the form criteria but not too sure. Has any one got any idea updating a pass through query with a form as a criteria?
You can't refer to the form in a pass through query. A pass through query is simply connection properties and an unparsed string. Access passes the unparsed string to the RDBMS to execute. Access knows nothing about the RDBMS, the RDBMS knows nothing about access. As such, you cannot refer to objects within Access in a pass through query.