Now that I've gotten most of the forms started...I've noticed a lot of routines that are common across them. Hmmm...global? Well here is the first code and naturally it doesn't work. I've created a Module called Routines and put the following Public Sub in it.
Public Sub ClearItem(SelectedForm As String, ByVal Pctl As Control, ByVal Nctl As Control, ByVal Tctl As Control, ByVal Qctl As Control)
SelectedForm Pctl.Enabled = False
SelectedForm Nctl.Enabled = False
SelectedForm Tctl.Enabled = False
SelectedForm Qctl.Enabled = False
SelectedForm Pctl.Value = Null
SelectedForm Nctl.Value = Null
SelectedForm Tctl.Value = Null
SelectedForm Qctl.Value = Null
End Sub
I have an editing form from which I call this Sub using the following code:
Call Routines.ClearItem("Forms!ScenarioOrdnanceForm!", P01, N01, T01, Q01)
It is then suppose to act on the SelectedForm but I get the Runtime 424 error: Object required.
Any suggestions would be great.
Public Sub ClearItem(SelectedForm As String, ByVal Pctl As Control, ByVal Nctl As Control, ByVal Tctl As Control, ByVal Qctl As Control)
SelectedForm Pctl.Enabled = False
SelectedForm Nctl.Enabled = False
SelectedForm Tctl.Enabled = False
SelectedForm Qctl.Enabled = False
SelectedForm Pctl.Value = Null
SelectedForm Nctl.Value = Null
SelectedForm Tctl.Value = Null
SelectedForm Qctl.Value = Null
End Sub
I have an editing form from which I call this Sub using the following code:
Call Routines.ClearItem("Forms!ScenarioOrdnanceForm!", P01, N01, T01, Q01)
It is then suppose to act on the SelectedForm but I get the Runtime 424 error: Object required.
Any suggestions would be great.