Clear check boxes on an Access Form automatically.

G

geo

I would like to use the "OnLoad" Property to clear checkboxes on a Form
automatically when it opens. Any ideas?
 
F

fredg

I would like to use the "OnLoad" Property to clear checkboxes on a Form
automatically when it opens. Any ideas?


Your check box is bound to a table field so you need to run an update
query:

CurrentDb.Execute "Update MyTable Set MyTable.CheckName = 0;",
dbFailOnError

You will need to have a library reference set to the
Microsoft DAO 3.6 Object Library.
Open any code window. Click on Tools + Reference.
If you already have a reference to the above library set you don't
have to do anything. If the reference is not checked, scroll down the
list until you get to it. Place a check in the check box. Save the
change.
 
G

geo

Good Assist, Thanks Fred!

fredg said:
Your check box is bound to a table field so you need to run an update
query:

CurrentDb.Execute "Update MyTable Set MyTable.CheckName = 0;",
dbFailOnError

You will need to have a library reference set to the
Microsoft DAO 3.6 Object Library.
Open any code window. Click on Tools + Reference.
If you already have a reference to the above library set you don't
have to do anything. If the reference is not checked, scroll down the
list until you get to it. Place a check in the check box. Save the
change.
 
Top