GregoryWest
Registered User.
- Local time
- Yesterday, 19:58
- Joined
- Apr 13, 2014
- Messages
- 161
OK I thought this would be easy, go figure it isn't.
I need to change a label of a VBA form. There are a few check boxes for work to be done a big label box Named 'CompMsg' (this is what I want to change). and a button to get the whole batch running.....
When I press the button the called VBA contains the lines:
This works just fine. Below the change of the label there is a bunch of connands testing various conditions and executing other VBA cide. Something like:
Now on one of these VBA subs, inside a loop another VBA sub is called and again one more time:
This change of caption gives me a runtime error 424 object not defined.
Now the VBA that the button calls is located under the "Build Event..." Sub1 and Sub2 are located in a common container of VBA code as it is called from various places.
I need to change a label of a VBA form. There are a few check boxes for work to be done a big label box Named 'CompMsg' (this is what I want to change). and a button to get the whole batch running.....
When I press the button the called VBA contains the lines:
Code:
Private Sub LoadData_Click()
DoCmd.SetWarnings False
CompMsg.Caption = "Hi there Hi There..."
Code:
If Me.Load168 Then
Call RunLoad(168)
End If
Code:
call sub1(value)
private sub sub1(value1 as integer)
do while ......
call sub2(value2)
...
loop
end sub
private function sub2(cntr as integer)
.... do some stuff.... and then
msgline = ("Currently " & Left(Str((curr_rec / totrecs)), 6) & "% Done.")
If curr_rec = (Int(curr_rec / 10) * 10) Then CompMsg.Caption = msgline
endsub
Now the VBA that the button calls is located under the "Build Event..." Sub1 and Sub2 are located in a common container of VBA code as it is called from various places.