I have two different forms, one has 5 buttons and the other one has 5 textboxes By clicking one of the five buttons from the first form, I want the user to be sent to the 2nd form but only see one textbox, the other 4 are supposed to be invisible. Whenever I try to run my code, I get 2 separate error codes: the first error I get is runtime error 424 (error appears on the first form), the second error I get is runtime error 94 (2nd form)
Here is the code I am trying to execute
----first form----
Public Sub Button_Click()
DoCmd.OpenForm "All in one ", acNormal, OpenArgs:="Associate"
End Sub
----2nd form----
Private Sub Form_Open(Cancel As Integer)
Dim Source As String
Source = Me.OpenArgs
If Source = "Associate" Then
Associate.Visible = True
Professional.Visible = False
Senior_Pofessional.Visible = False
Expert.Visible = False
Senior_Expert.Visible = False
End Sub
I haven't written the code for the other 4 buttons since I first want to make it work for the first one. I am very new to both MS Access and coding so any sort of help would be highly appreciated :)