snicker
Registered User.
- Local time
- Today, 21:58
- Joined
- Aug 8, 2003
- Messages
- 91
I'm trying to make it easy for a user to resize text throught out a database. This is the code I'm using minus the error checking
And I'm calling this code in the onOpen event from a form
This works great for most forms, but itdoesn't work on forms with subforms. I've tried all kinds of stuff to get this to work. Can some lead me in the right direction?
Code:
Function SetTextSize(FormName As Form)
Dim CComp As New CComputer
Dim ctl As Control
With CComp
filestring = .UserName
End With
fUserName = filestring
UsersSettingSize = DLookup("TextSize", "tblOptions", "UserName = '" & fUserName & "'")
For Each ctl In Forms(FormName.Name)
Select Case ctl.ControlType
Case acTextBox
ctl.FontSize = UsersSettingSize
Case acComboBox
ctl.FontSize = UsersSettingSize
Case acListBox
ctl.FontSize = UsersSettingSize
Case acLabel
ctl.FontSize = UsersSettingSize
Case Else
'do nothing for the other controls
End Select
Next ctl
End Function
Code:
SetTextSize(Me)