Checkbox updateing Table

HowardChr

Noob
Local time
Today, 10:52
Joined
Apr 26, 2007
Messages
35
Thanks for your time to look at this... I am working a project that has some checkboxes on a form. I would like to have it so when a checkbox (Check1) is clicked and then the "Submit" button is pressed, it updates a form ("InputH"). I currently have the table set up with Yes/No data types. I need when submit is pressed for the Yes/No checkbox in the table is updated to show a check. Here is what I have so far:


Private Sub Command21_Click()

Dim update As String

If Check1 = True Then
update InputH.Table
Set Completed = (Hazard1 = -1)
Else
update InputH.Table
Set Completed = (Hazard1 = 0)
End If

End Sub


However, when I try to execute the scripting, I am getting an error: "Compile Error: Expected Sub, Function, or Property" and it has the word 'update' highlighted in the line: (update InputH.Table). What could I be doing wrong?

Thanks in advance for your help.
 
When you are entering data via an access form you are in effect updating the table. So why not bind the check boxs to the underlying table.

to specifically update a table requires a recordset object.
 
AHHH I got it now.... you have to use the table create a form with and then when updated, that information gets put directly to the form... MANY thanks! :D
 

Users who are viewing this thread

Back
Top Bottom