Using Form Values

Stemdriller

Registered User.
Local time
Today, 19:54
Joined
May 29, 2008
Messages
187
Hi Everyone,

I got a simple problem, but just can't put my finger on.

Two tables, tblCustomers and tblCustomerContacts

When adding a new Customer, via a form, I put there company name and address and generate a 'CustomerNo', then click a button that takes you to another form to add all the authorised contacts, using the 'CustomerNo' that has just been generated.

I managed to get the 'CustomerNo' value to appear in the relevant field but when I save it, it just places a zero in the tblCustomerContacts.

The relationships are one to many, as one Customer can have many contacts.

Any help would be greatfully received

Thanks
 
How did you "get the 'CustomerNo' value to appear in the relevant field?"
 
How did you "get the 'CustomerNo' value to appear in the relevant field?"


in 'Default Value' of 'CustomerNo' on tblCustomerContacts' form set to = [Forms]![frmAddCustomer]![CustomerNo]
 
in 'Default Value' of 'CustomerNo' on tblCustomerContacts' form set to = [Forms]![frmAddCustomer]![CustomerNo]
I wouldn't do it that way. In the code that opens the form I would just use

Forms!YourNewFormnameHere.YourTextboxHere = Me!CustomerNo

after the code that opens the form.
 

Users who are viewing this thread

Back
Top Bottom