B
BusterB
Hi, (might be one for Douglas or Allen?)
After scouring this forum I am i bit confused.
I have created a Public Function that I call in the afterupdate event of
several text boxes on different forms and subforms.
This function checks for specific format of text. What I want to be able to
do is setfocus back to the control that called the fuction if the format was
incorrect.
The Function is "FormatDTG" and an example of the control calling it might
be "Forms!InstallationDetailsFrm!RigmoveSubFrm.Form!SignalReceivedDTG"
My confusion is this - in the afterupdate event of this control I want to
pass the control name to the function so that it knows where to setfocus back
to if format is wrong.
Do I pass this information as a string or control?
i.e Public Function FormatDTG(strDTGToFormat As String, ctlControlName As
Control) As String
or
Public Function FormatDTG(strDTGToFormat, strControlName As String) As String
Also I have found several examples in this forum of people doing similar
things like this but either in the Forms module(Me.) or Public module
refering to forms without subforms.
Help in this is appreciated, I have tied myself in knots (mentally) over this.
Thanks in advance.
After scouring this forum I am i bit confused.
I have created a Public Function that I call in the afterupdate event of
several text boxes on different forms and subforms.
This function checks for specific format of text. What I want to be able to
do is setfocus back to the control that called the fuction if the format was
incorrect.
The Function is "FormatDTG" and an example of the control calling it might
be "Forms!InstallationDetailsFrm!RigmoveSubFrm.Form!SignalReceivedDTG"
My confusion is this - in the afterupdate event of this control I want to
pass the control name to the function so that it knows where to setfocus back
to if format is wrong.
Do I pass this information as a string or control?
i.e Public Function FormatDTG(strDTGToFormat As String, ctlControlName As
Control) As String
or
Public Function FormatDTG(strDTGToFormat, strControlName As String) As String
Also I have found several examples in this forum of people doing similar
things like this but either in the Forms module(Me.) or Public module
refering to forms without subforms.
Help in this is appreciated, I have tied myself in knots (mentally) over this.
Thanks in advance.