I have a simple MyAddress Project. It consists of one main table, a couple of queries, some forms and reports. Most fields in the table are typical text fields. The project allows me to select records from the table and print labels for those selected records. One field is a "yes/no" field. If the field value is true, the label prints; otherwise it does not. I have a form which allows me to scan the list of records and mark those I wish to print. So far so good. I am trying to add two buttons to the form to enable me to 1. Clear All and 2. Check All. I am trying to use an UPDATE statement to activate when I click the appropriate button. However, when I execute, I get the error message "Compile error: Sub or Function not defined". I have little experience with Access 10 and suspect the solution is simple, but I can't find it.
The name of the table is tblMyAddresses.
The firld I am trying to UPDATE is PrtLbl.
The update value will be true or false depending on the button clicked.
Since I want to change the values in all records, there is no WHERE required. The code I am trying is as follows:
Option Compare Database
Public Sub CheckAll_Click()
Update tblmyaddresses
Set PrtLbl = False
End Sub
Can anyone help me with this?
The name of the table is tblMyAddresses.
The firld I am trying to UPDATE is PrtLbl.
The update value will be true or false depending on the button clicked.
Since I want to change the values in all records, there is no WHERE required. The code I am trying is as follows:
Option Compare Database
Public Sub CheckAll_Click()
Update tblmyaddresses
Set PrtLbl = False
End Sub
Can anyone help me with this?