Re: Update query
- From: Ernst Guckel <ErnstGuckel@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 1 May 2005 17:03:01 -0700
> >UPDATE " & sTable & " SET [" & sField & "] = " & _
> > "'" & sValue & "' " & _
> > "WHERE [Date]=#" & sDate & "#;"
> It *should* set the value to NULL if the Allow Zero Length is false.
> If this causes problems, you'll need to update it to the word NULL
> without quotes - probably using an IF block in your code to run the
> above query if there is data in sValue, or to NULL if there isn't.
VBA wont allow me to set it to Null. If I set it to "" then it gives me this:
ActionQuery error: Data type mismatch in criteria expression.
The expression (SQL) being passed is :
UPDATE tDayData SET [Daily Sales] = '' WHERE [Date]=#1/1/2005#;
Those are 2 single quotes... I am passing this from Excel using ADO if that
matters...
Ernst.
.
- Follow-Ups:
- Re: Update query
- From: John Vinson
- Re: Update query
- References:
- Update query
- From: Ernst Guckel
- Re: Update query
- From: John Vinson
- Update query
- Prev by Date: Re: Update query
- Next by Date: Re: Update query
- Previous by thread: Re: Update query
- Next by thread: Re: Update query
- Index(es):
Relevant Pages
|