Re: UPDATE Not UpDating
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Fri, 7 Oct 2005 10:51:24 -0400
Is TableNumber numeric, or are you storing a number in a text field?
If it's text, you need quotes around the value:
CurrentDb.Execute "UPDATE Tables SET TInUse = True WHERE TableNumber = " &
Chr$(34) & Me.TM & Chr$(34)
If that's not the problem, make sure you didn't misspell any of the field
names, and that Me.TM actually has the value you expect it does.
You can try
Dim strSQL As String
strSQL = "UPDATE Tables SET TInUse = True WHERE TableNumber = " &
Chr$(34) & Me.TM & Chr$(34)
Debug.Print strSQL
CurrentDb.Execute strSQL, dbFailOnError
Look at what's printed for strSQL: does it make sense?
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"DS" <bootybox@xxxxxxxxxxxxx> wrote in message
news:A7i1f.751$Hm3.56@xxxxxxxxxxx
> Douglas J. Steele wrote:
>
>> Get rid of the commas.
>>
>> As well, you need to put the reference to Me.Tm outside of the quotes:
>>
>> CurrentDb.Execute "UPDATE Tables SET TInUse = True WHERE TableNumber = "
>> & Me.TM
>>
>>
>
> I get Error code 3601, to few parameters -1 expected......
> What could it be?
> Thanks
> DS
.
- References:
- UPDATE Not UpDating
- From: DS
- UPDATE Not UpDating
- Prev by Date: Re: copying data from a SQL server to a MDB table
- Next by Date: Re: Problem with an "optional" parameter...
- Previous by thread: UPDATE Not UpDating
- Next by thread: Re: Form Autocalculations
- Index(es):
Relevant Pages
|