var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: sql statement not working
Can anyone tell me why this statement wont work
Dim SQL_Text As String
SQL_Text = "UPDATE Equipment SET Status = 'Available' WHERE DemoID = 'forms!frmDemoInventory!txtDemo' AND Status = 'Committed'"
DoCmd****nSQL (SQL_Text), acEdit
The problem is
(the me. operator dose not work either, though it will work out side of the sql statement later in my code to set focus)
where txtDemo is a unbound text box on my form, and Status, DemoID are fields in my table Equipment
If I use a specific value for txtDemo and place it in my code the sql statement work fine
Presuming a numeric value:
SQL_Text = "UPDATE Equipment SET Status = 'Available' WHERE DemoID = " & forms!frmDemoInventory!txtDemo & " AND Status = 'Committed'"
If it's text, you'd need single quotes around the value.
Paul thank's for the reply. Clearly I do not yet understand how to put two statements together. In my 3 begging books on vba and sql, none had referenced the need to concatenate (I think that's a concatenation) of the two WHERE statements. They just put them together like I had. Thank again...Tim
If you're looking for a good tutorial on building SQL in Access I would check out
Martin Green's site. Cheers!
Me.Geek = True
Thank's Nick, I'm going to check it out right now. Tim