B
BlueWolverine
Hello,
MS ACCESS 2003 on XP PRO.
I have a form checkbox, and AFTERUPDATE of the value, I run a bunch of code.
Part of the code calls a sub in a module. During this sub, I define two
string values. (they happen to be shaped like SQL statements but at this
point the computer doesn't know that) the first one runs fine, and the MSGBOX
statement after shows the text correctly.
However, when the yellow gets on top of the SECOND str_SQL = statement, and I
hit F8, the code skips OUT of the SUB, back to the AFTERUPDATE statement on
the line that would execute after the sub. This even happens when I just run
the thing with no break points. It's like Str_SQL = is function like EXIT
SUB.
What the heck is going on?
<<<
str_SQL1 = "UPDATE t_Plates SET t_Plates.CurrVIN = Null, t_Plates.Assigned =
False, t_Plates.Active = False " & _
"WHERE ((t_Plates.Plate)='" & in_PlateNo & "');"
MsgBox str_SQL1
[This is where it breaks]
str_SQL2 = "UPDATE t_PlateHistory SET t_PlateHistory.Unassigned
= #" & Now() & "#, t_PlateHistory.Comments = '" & t_PlateHistory.Comments &
Chr(10) & "'Plate Deactivated at this time - '" & Now() & " " & _
"WHERE (((t_PlateHistory.Unassigned) Is Null) AND
((t_PlateHistory.Plate)='" & in_PlateNo & "') AND ((t_PlateHistory.VIN)='" &
in_VIN & "') AND ((t_PlateHistory.Assigned) Is Not Null));"
[It never gets to this msgbox statement]
MsgBox str_SQL2
MS ACCESS 2003 on XP PRO.
I have a form checkbox, and AFTERUPDATE of the value, I run a bunch of code.
Part of the code calls a sub in a module. During this sub, I define two
string values. (they happen to be shaped like SQL statements but at this
point the computer doesn't know that) the first one runs fine, and the MSGBOX
statement after shows the text correctly.
However, when the yellow gets on top of the SECOND str_SQL = statement, and I
hit F8, the code skips OUT of the SUB, back to the AFTERUPDATE statement on
the line that would execute after the sub. This even happens when I just run
the thing with no break points. It's like Str_SQL = is function like EXIT
SUB.
What the heck is going on?
<<<
str_SQL1 = "UPDATE t_Plates SET t_Plates.CurrVIN = Null, t_Plates.Assigned =
False, t_Plates.Active = False " & _
"WHERE ((t_Plates.Plate)='" & in_PlateNo & "');"
MsgBox str_SQL1
[This is where it breaks]
str_SQL2 = "UPDATE t_PlateHistory SET t_PlateHistory.Unassigned
= #" & Now() & "#, t_PlateHistory.Comments = '" & t_PlateHistory.Comments &
Chr(10) & "'Plate Deactivated at this time - '" & Now() & " " & _
"WHERE (((t_PlateHistory.Unassigned) Is Null) AND
((t_PlateHistory.Plate)='" & in_PlateNo & "') AND ((t_PlateHistory.VIN)='" &
in_VIN & "') AND ((t_PlateHistory.Assigned) Is Not Null));"
[It never gets to this msgbox statement]
MsgBox str_SQL2