Please help- :(

spalmateer

Registered User.
Local time
Today, 12:57
Joined
Dec 5, 2000
Messages
46
Hello,
I having a really hard time trying to get a form/linked-form to work together. My main form (frmCustInf) has customer information fields with an autonumber customer number field. On this form I have a command button which brings up another form (frmModelSerialNum)which has model/serial number information and a customer number field with the number format. I have created a link between these two forms through customer number using the command button wizard. The record source for form frmCustInf is a parameter query named qryCustInfAddress which allows the user to enter an address and it pulls up the specific record. The record source for the form frmModelSerialNum is the table tblModelSerialNum. My table tblCustInf (which the query is based off) and the table tblModelSerialNum have a one to one relationship. I set it up to have a one to one relationship because the customer will have only one set of model/serial numbers and sometimes this information will not be entered when the customer information is entered.
Currently what happens is after I enter customer information then press the command button to go to frmModelSerialNum the customer numbers do not transfer over.
Therefore anything entered into the form doesn't go into the table.
I believe the problem is that when autonumber creates a customer number in the main form- it's not creating a customer number in the modelserialnum form. How do I solve this problem? Could there be a problem with the relationships? Should I run the second form off the same query as the first form? Thanks for any information!
Scott
 
On your child form (frmModelSerialNum), open up the property sheet for the customer number field and in the Default Value field, put the following:

=[Forms]![frmCustInf]![NameofCustomerNumberField]

This sets the default value of the customer number field in your child form to the same customer number field of the parent form.

Hope this helps

[This message has been edited by SomeGuy (edited 12-21-2000).]
 
Hello,
When I entered I get the error message #Name? - but that works for the customers who have records already or have been created in the tblModelSerialNum. The problem is that when autonumber assigns a customer number to the table tblCustInf I need it to also assign the same number to the table tblModelSerialNum. That way the record is created. Is that possible? Thanks Again for the help and insight!
Scott
 
The table tblModelSerialNum obviously has a field for this number. Make sure this is not an autonumber field as you want to assign a value to it. By setting the default value of the customer field in the frmModelSerialNum to the value of the customer field of the Main form, frmCustInf, this value should get put into the table.

Typically the #Name? error will come up in a field when it is unsure of the record source. Ensure that the name of the field is the same as the table field. Also ensure that the table IS your record source for the form frmModelSerialNum.

This stuff is a little tricky and it is normally just a small oversight that causes the problem.

Good luck.
 
Yes you were right. The problem was with the record source. I retyped in the default expression to equal customer number on the main form and now it's working fine. Thanks so much for the help!
Scott
 

Users who are viewing this thread

Back
Top Bottom