The ItemNumber7 is a field name on the current form
The Where Clause is highlighted in Red in the code window. I guess I have a comma missing somewhere
Whenever you wrap a line of code to the next line, you must use the underscore ( _ ) as the final character in the line, which you did for line 1, and an ampersand to merge the two lines of code. And when you merge two lines of code you need to make sure there is a space between the word that ends the first line and the word that begins the second line. Otherwise:
Date() WHERE
becomes
Date()WHERE
which would generate an error at run time
HTH
Dale
Derek Brown
ASKER
Solved
Thank you.
Just to be clear, when you atribute the solution to an expert but also indicate some else helped, How are points distributed to contributors?
Derek Brown
ASKER
I'm getting error missing two patameters with:
strSQL = _
"UPDATE ItemQuery SET ItemQuery.ItemDateCreated = Date()" & _
" WHERE ItemNumber=" & ItemNumber7
CurrentDb.Execute strSQL, dbFailOnError
Whenever you wrap a line of code to the next line, you must use the underscore ( _ ) as the final character in the line, which you did for line 1, and an ampersand to merge the two lines of code. And when you merge two lines of code you need to make sure there is a space between the word that ends the first line and the word that begins the second line. Otherwise:
Date() WHERE
becomes
Date()WHERE
which would generate an error at run time
HTH
Dale