Hello!
I'm new to this forum, so hopefully what I'm writing will make sense to you...
I'm working on a library database. One of my forms inputs the following parameters:
BorrowerID - to reference borrower
RecordID - to reference book
I also want to set Binary Value for that book as False to indicate that it's been taken. The name of the binary column is "Available"
All these variables are part of the Query "Request_Q" on which the form is based.
So, to set the value to false I go into properties of a command button that saves the form's record, and in the Event->OnClick I go into code builder.
Here is what I write:
Private Sub Command8_Click()
Dim strSQL As String
strSQL = "UPDATE Books_By_Library SET Available = False WHERE RecordID = Combo4"
Books_By_Library is the name of the table where "Available" column is located.
Combo4 is the name of the textbox in the form that receives RecordID number.
So, I'm pretty sure that the SQL command is correct, however I don't know how to correctly reference that Combo4 textbox.
Any help would be greatly appreciated!