On Tue, 3 Aug 2004 15:20:41 -0400, "Bob Barrows [MVP]"
Thanks Bob. I was able to correct the problem by changing the way i
created the variable to simply:
strkilos = Request.Form("kilos")
if strkilos = "" then
strkilos = Null
In otherwords, I just had to remove the quotation marks from around
the word Null, and it works both when there is a number in the field
and when there is not.
Below is the way I'm calling the query, and I still think it may not
be the most elegant, but here goes:
recordSet.Open "SELECT (max(reference)+1) as MyMax FROM AIRFREIGHT",
objHamDB.qAAR strawb, strshipper, strconsignee, strpcs, strkilos,
strcommodity, strdest, stretd, streta, strlast_flight, strremarques,
strcustoms, strarrived, strbilled, newnum, pnow, struser
For reasons I needn't go into, I can't use the autonumber feature for
my file numbers, so I briefly create a recordset to obtain the highest
number, then add one and create the variable "newnum"
Perhaps you can advise a better way to do this, tho the above is
working for me now ok.
Thanks again. I've been going thru this application I created some
time ago and I'm trying to convert things over to the "saved parameter
method" to make it more efficient, and to get more familiar and
comfortable using this method.
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."