This may be slightly bad practice, but I am doing a small SQL statement in a module of mine and am having an issue with using DMax.
The code I am trying to put together is:
The variable [quotenumber] was just an easy way I went with to find the first 5 digits of the quote (essentially the "primary" numbers). I then try to pass that into the DMax as my criteria.
The issue I am having is that I keep getting a compile error "Expected end of statement" and then it highlights [RevisionNum] in the DMax block. Why is that?
The code I am trying to put together is:
Code:
Dim quotenumber As Long
quotenumber = Left(Me.QuoteNumTxtbx, 5)
strsql = " Update tblQuoteNumGeneration"
strsql = strsql & " SET RevisionNum = nz(dmax("[RevisionNum]", "tblQuoteNumGeneration", "quotenumber")
The variable [quotenumber] was just an easy way I went with to find the first 5 digits of the quote (essentially the "primary" numbers). I then try to pass that into the DMax as my criteria.
The issue I am having is that I keep getting a compile error "Expected end of statement" and then it highlights [RevisionNum] in the DMax block. Why is that?