Reference to Tab Control in VBA (Should be easy)
This is my code (I don't know how to post it fancy)
Private Sub Form_Load()
Dim rs As dao.Recordset
Dim permission As String
Dim ctlTmp As Control
Set rs = CurrentDb.OpenRecordset("Select * FROM qry_UserGroup")
permission = rs!UserPermissions
If permission = "Admin" Then
Forms("frm_EmployeeInformation").AllowEdits = True
Forms("frm_EmployeeInformation").AllowEdits = False
On Error Resume Next
For Each ctlTmp In Forms("frm_EmployeeInformation").Controls
If TypeOf ctlTmp Is ComboBox Or TypeOf ctlTmp Is TextBox Then
ctlTmp.Enabled = False
Set rs = Nothing
Thank you for taking the time to report an issue.
What's wrong... Please write below.
Different iterations of Me.TabCtl0.Pages.Page1.SetFocus doesn't work. I am unable to find the correct syntax to reference the tab.
Main Form: frmSwitchBoard
Tab Control: TabCtl0
Sheet Name: SearchClaims
Text Field: Text54
I am trying to reference that field in a query, but I am trying a hard time getting it to find the field.
This is what I have so far:
I tried going through other post and looked at the following link, http://access.mvps.org/access/forms/frm0031.htm, but wasn't able to figure it out
I have a Tab Control on my form and have recently copy-pasted my controls on to it - however my VBA no longer works. From what I've read, each control (regardless of which tab its on) needs a unique name - check, and therefore can be referred to as if it were directly on the form and there was no Tab control.
txtDOB is the text field to store - you guessed it, a Date Of Birth.
lblAGE is a label to show "30 years, 3 months" etc, which is done by VBA within OnCurrent so it refreshes automatically as you move from person to person.
Now a simple bit of code like. lblAge.Caption = "test" creates runtime error 424; Object required.
It works directly on the form outside the realms of the Tab, but not on a Tab.
Form is called frmMembers
Tab Control called TabCtl1
Page Name called Page1
I have 10 navigation buttons on the parent form, each with a subform. I desparately need to be able to reference controls within each subform, however am struggling with the syntax.
I have tried the following code:
which works beautifully for the first subform (ie. Tab Index = 0)
However, I am stumped as how to reference a control on any of the other 9 subforms (ie Tab Index - 1-8) as the aforementioned syntax doesn't work for any of them but the first (ie Tab Index
Currently I have a form with tab control. There are 7 tabs and the 7th tab has a long list of check boxes that wont fit inside the area I set aside for the tab control box. When I place the check boxes into the tab page, the page automatically re-sizes to contain all the new check-boxes. I am not able to re-size the tab page. Are there any settings that will allow me to re-size the tab page to contain all the check-boxes and scroll to view them all?
It seems like it should be easy and straightforward. right?
I am trying to reference an object (called OrderLink) on the InvoiceLineDetail in a query.
These were attempts at trying to go about it. All I get is a parameter box, which there should be none (the forum is open so it isn't that
On this tab is a page called pg1 and on the tab is a subform called form2.
This form2 has a control I'd like to make enabled when a button is pressed from MainForm.
I've been trying to use