Kamis, 29 November 2012

RE: [MS_AccessPros] Using UPDATE to change data in a table via combobox and command button

 

Where does V come from? Is the Status field text or numeric?

Learn how to implement
Debug.Print strSQL
So you can troubleshoot on your own.

Duane Hookom MVP
MS Access

> From: GKillah36@aol.com
>
> Hi all,
>
> Please see my VB below:
>
> Private Sub commandVoid_Click()
>
> Dim strSQL As String
>
> If MsgBox("Are you sure you want to void this ticket?", vbYesNo) = vbYes Then
> strSQL = "UPDATE tableWarehouseData " & _
> "SET Status = " & V & " " & _
> "WHERE ticket = " & Me.comboVoidTicket & ""
> CurrentDb.Execute strSQL, dbFailOnError
> End If
> End Sub
>
>
> ----------------------------------------
>
> This should change the Status field of all tickets in the table tableWarehouseData to V when clicked based on the selected ticket number in the comboVoidTicket combobox. However, I'm getting an error of "Run-time error '3144': Syntax error in UPDATE statement." What am I missing here?
>
> Thank you,
> Tony
>
> FYI, I'm using Access 2010.

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar