PDA

View Full Version : Solved: Update Date in table to Taday's Date not even workin



Trevor
04-11-2008, 09:57 PM
ahhh. queries can be so frustrating, I have a query that should update the date in the table to the current date
where the username in the table = the ID of the account loged in , and when I run it I don't even get warning "updating x records":




DoCmd.RunSQL "UPDATE IndividualSettingsTbl SET IndividualSettingsTbl.Date = '" & stDate & "' " & _
"Where IndividualSettingsTbl.UserName = '" & AccountName & "';"









stDate is declared as a date that is = Date , I tried useing Date(), Date instead of a variable
I have also tried Date = #" & Date & " #; ' with out luck think access just wanted to be picking but didn't work

Trevor
04-12-2008, 09:17 PM
DoCmd.RunSQL "UPDATE IndividualSettingsTbl SET IndividualSettingsTbl.Date = '" & stDate & "' " & _
"Where IndividualSettingsTbl.UserName = '" & AccountName & "';"


It looks like my same OP VBA but don't know why this worked now and not before