Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customer records won't appear in the Orders Table

Status
Not open for further replies.

3239

Technical User
May 14, 2003
64
When I try to enter a new customer record in my Customers table it does not show up in the Orders table as soon as I enter it in Customers table. When I try to Enter an order for the customer that was created, I get and error message telling me that "You cannot add or change a record because a related record is required in the table orders. But when I close my Orders form and go to the Main Switchboard, the new customer record appears in the Orders table. My question is, How do get the New Customer record to appear in the Orders Table as soon as it is entered into the New Customers Table.

Please Help
 
Hi

I think you mis-state the problem, the Customer row show not appear in the Orders table, it quite rightly belongs in the Customer table

But you have a referential integrity relationship beteen Custome and Orders which is fine

IS your problem that you have an Order Entry form which asks for Customer, if Customer is not present you switch to a different form and add the customer

Then you want the (new) Customer to be available in the combo or where ever you are looking up teh customer?

If you are using the not in list event of the combo to detect that Customer does not exist and then to add the customer there is a return value in the notinlist event to tell access you have added a new row, if you are not uing this mechanism, I would sugget you open the 'Add Customer' form modally (ie as a dialog) and on return from teh form requery the Combo box

Have I understood you problem?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top