By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,392 Members | 1,556 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,392 IT Pros & Developers. It's quick & easy.

Linking checkboxes to a table

P: 50
Hi there

I am a relative novice to VB within Access so bare with me, I hope you can help...

I have a form linked to a table on which I have 4 check boxes. The check boxes, when ticked put a '-1' value in the relevant field and a '0' if not. This I understand.

I have another form however, not bound to a table. On this form I would like 4 tick boxes, but only make them 'enabled' if they are ticked on the other form (there is a '-1' in the table). I would put this code into an 'on open' of this form.

Excuse my basic descriptions, as i say... relative novice!
Dec 13 '07 #1
Share this Question
Share on Google+
2 Replies


puppydogbuddy
Expert 100+
P: 1,923
Hi there

I am a relative novice to VB within Access so bare with me, I hope you can help...

I have a form linked to a table on which I have 4 check boxes. The check boxes, when ticked put a '-1' value in the relevant field and a '0' if not. This I understand.

I have another form however, not bound to a table. On this form I would like 4 tick boxes, but only make them 'enabled' if they are ticked on the other form (there is a '-1' in the table). I would put this code into an 'on open' of this form.

Excuse my basic descriptions, as i say... relative novice!
Here is what the statement for one tickbox would look like in generic terms. You would need to replace the object names I used for illustrative purposes with the names actually used in your application. You would also create a similar statement for each checkox control on your unbound form

Expand|Select|Wrap|Line Numbers
  1. If DLookup("[Tickbox1]", "YourTable") = 0 then
  2.         Me!txtCkbox1.Enabled = False
  3. Else
  4.         Me!txtCkbox1.Enabled = True
  5. End If
Dec 13 '07 #2

P: 50
Worked 1st time. I had to add criteria as well but managed to sort that myself.

Thank you very much for your help. OllyJ
Dec 14 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.