Code is listed below:
Private Sub Command32_Click()
Dim db As Database
Dim qdf As QueryDef
Set db = CurrentDb
Dbs.Execute "UPDATE tblTicketInventory " _
& "SET [STUDENT_ID] = '" & Me.txtNetID & "', [LAST_NAME] = '" & Me.txtLastName & "', [FIRST_NAME] = '" & Me.txtFirstName & "'" _
& "WHERE [MONTH] = '" & Me.ListsMonth & "' AND [SHOW] = '" & Me.Cmbassignshow & "' AND [EVENT] = '" & Me.assignevent & "' AND [LOCATION] = '" & Me.assignlocation & "' AND [SECTION] = '" & Me.assignsection & "' AND [ROW] = '" & Me.assignrow & "' AND [SEAT] = '" & Me.assignseat & "' AND [DATE] = #" & Me.assigndate & "# AND [TIME] = #" & Me.assigntime & "#;"
MsgBox "Ticket Assigned!"
End Sub
The Code will update a ticket inventory table after we have already entered the ticket into it. We leave the Sttudent ID Last Name and First Name blank until we issue the ticket. the code is a part of a cmdbutton that is a part of the form to assign a ticket to a person.





Reply With Quote