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

  • Thread starter Thread starter KAK
  • Start date Start date
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
 
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?
 
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
 
Back
Top