Passing Data Through Forms

DCXtreme

Registered User.
Local time
Yesterday, 17:42
Joined
Jan 5, 2006
Messages
43
I know there are other threads on this but I have tried all the solutions and none have worked.

I currently have 2 forms, a customer form and a customer health form.

I want to pass the membershipNo from the customer form to a newly opened customer health form.

this is the code I am using but it isnt working, actually it is, but when i delete all the current customer entries and enter new ones it doesnt pick up the details and all the controls on the customer health form are greyed out.

Code:
Private Sub cmdCustHealth_Click()

DoCmd.OpenForm "CustomerHealth", , , "[MembershipNo] = " & Forms!CustomerForm!membershipNo, , acDialog
    
End Sub

The control source on the text box on the customer health form is "membershipNo" where am I Going wrong?
 
Last edited:
Do both of these forms use the same table as their data source?

If not then explain your setup, use the real names of the tables and forms. (e.g. tblCustomer , frmCustomers , frmMembership etc). I may be one my own but I find it a lot easier for follow. Also what if any is the relationship between the tables.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom