G
Guest
Hi:
My database works fine last week, but this week when I open a form, or do
something else need to run this kind of code:
----------------------------------
strSQL = "SupplierCode = " & "'" & Me.SupplierCode & "'" 'build a SQL string.
DoCmd.OpenForm FormName:="frmProductsDataSheetView", view:=acFormDS,
whereCondition:=strSQL
---------------or----------------
strSQL = "SELECT ProductCode, NumOfPurchased, NumOfSold FROM Products Where
" _
& "ProductCode = '" & strMyProductCode & "'"
Set rst = dbs.OpenRecordset(strSQL)
---------------------------------
Will give me below error.
run-time error '3001'
Invalid argument
Why there was no problem at all to run this kind of code, but how these days
showing this? Do I miss something to update?
Really appreciate your help!
Thanks.
James
My database works fine last week, but this week when I open a form, or do
something else need to run this kind of code:
----------------------------------
strSQL = "SupplierCode = " & "'" & Me.SupplierCode & "'" 'build a SQL string.
DoCmd.OpenForm FormName:="frmProductsDataSheetView", view:=acFormDS,
whereCondition:=strSQL
---------------or----------------
strSQL = "SELECT ProductCode, NumOfPurchased, NumOfSold FROM Products Where
" _
& "ProductCode = '" & strMyProductCode & "'"
Set rst = dbs.OpenRecordset(strSQL)
---------------------------------
Will give me below error.
run-time error '3001'
Invalid argument
Why there was no problem at all to run this kind of code, but how these days
showing this? Do I miss something to update?
Really appreciate your help!
Thanks.
James