How do I refer to a checkbox on a tabcontrol within a form

K

KAK

I have a form that was getting to large for the screen so I created a tab
control with tabs for the jobs that need to be run each day. In my macro I
want to refer to the check box to see if it is checked. I can't seem to get
the syntac right. Can some one help me please?????

My form is called frmEnterDate
My tab control is called TABCTL
The tab (page) that contains the check box is called Monday
The Check box control is called Chk45372
 
K

KAK

Hi Roger,

Thanks for the quick response. I tried
[Forms]![frmEnterDate]![Chk45372]=True this is what I was using in my macro
prior to adding the tab control but I get an error that says type mismatch.
Any ideas?
 
K

KAK

Ok, I found out why I was getting the macro error. When I moved the checkbox
controls from my form to the Tab Control it changed all the check box names.
Once I changed them make it worked like magic.

KAK said:
Hi Roger,

Thanks for the quick response. I tried
[Forms]![frmEnterDate]![Chk45372]=True this is what I was using in my macro
prior to adding the tab control but I get an error that says type mismatch.
Any ideas?

Roger Carlson said:
Controls on a tab control are referenced as if they were directly on the
form, so it would be:

Forms!frmEnterDate!Chk45372


--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top