I have a form that contains client information such as client id, name, address etc. etc.
Then I have another form which is a list box that contains the client id and name.
What I’m trying to accomplish is that when I click a client id in the list box the form will load the detailed information of the client id that I choose from the list box.
List Box (lclient) code
Private Sub lclient_Click()
'assign value to global variable
gClientID = lclient
'load form
Dim sform As String
sform = "W7"
DoCmd.OpenForm sform, , , , acFormEdit
End Sub
Form Load Code
Private Sub Form_Load()
clientid.setfoc us
clientid = gClientID
End Sub
PROBLEM: When the form loads it’s only changing the value of the clientid field the rest of the data are not.
Please advise.
Thanks.
Then I have another form which is a list box that contains the client id and name.
What I’m trying to accomplish is that when I click a client id in the list box the form will load the detailed information of the client id that I choose from the list box.
List Box (lclient) code
Private Sub lclient_Click()
'assign value to global variable
gClientID = lclient
'load form
Dim sform As String
sform = "W7"
DoCmd.OpenForm sform, , , , acFormEdit
End Sub
Form Load Code
Private Sub Form_Load()
clientid.setfoc us
clientid = gClientID
End Sub
PROBLEM: When the form loads it’s only changing the value of the clientid field the rest of the data are not.
Please advise.
Thanks.
Comment