Problem with an update statement

rikklaney1

Registered User.
Local time
Today, 00:11
Joined
Nov 20, 2014
Messages
157
Hi guys. I'm having a problem with an update statement. It should set a yes/no field to yes but it asked me to "enter parameter value" when run. Do any of you see anything wrong with this statement?


For x = 0 To Me.zlist.ListCount - 1
If Me.zlist.Column(5, x) = False And Me.zlist.Column(6, x) = True Then
DoCmd.RunSQL "UPDATE [tbl_switchesstations] SET [wait] = True WHERE [tbl_switchesstations].[stcode] =" & Me.zlist.Column(1, x)
End If
Next
 
Try:
DoCmd.RunSQL "UPDATE [tbl_switchesstations] SET [wait] = -1 WHERE [tbl_switchesstations].[stcode] =" & Me.zlist.Column(1, x)

If Me.zlist.Column(1, x) is text then
[tbl_switchesstations].[stcode] ='" & Me.zlist.Column(1, x) & "'"
 
No, still gives me an "enter parameter value" message box. Wait. I think that may have done it. Try some testing now but at least it's not throwing up the message box now. Thanks a million.
 
You're welcome, good luck.
 

Users who are viewing this thread

Back
Top Bottom