Error 3201

I

iam5tv

Hi

I am making a simple sales database. I'm not too up with Access but
I'm finding it hard to figure this out.

Basically there is a customer form where you enter name, address etc.
This has the Customer ID from the table which is the primary key. I
have a command button which should take this customer ID and put it on
the Orders form. This works but after I add data to the orders form
and click into the order details subform, it shows the Error 3201. If
I remove the copying of the key and type it manually into the orders
form, there is no error.

Help!

Thanks
 
G

Guest

since no one has jumped in to help

you have a customer form - so your example is a new customer because you
complete this form - - - but kind of implies that you could have a repeat
customer and could simply look up their data rather than enter it.....so
there is a customer table I guess

the only point to this is whether you have locked together the customer form
- orders form - order details form ; somehow illegally when you do a new
customer....since you say it works ok when you type in the info ....

the Orders form/table would have its own unique order ID key for each
record....and this Order form/table record only needs the unique customer ID
for cross reference to the Customer table. So you have a customer ID field
in the Orders form/table but it is not the key - only for cross reference...
A typical design would be to use a combo box in the Orders Form that sourced
on the Customer table to look up the customer and that selection puts their
ID into the customerID field in the Orders Form.....

then of course the Orders Details form/table have their own unique detail
IDkeys and each record here has the Order ID key field but not as the
key...only for cross reference.... Presuming this is a subform to the Orders
form and you have the ID cross reference selected by the wizard when you
inserted this then the relationship is already there....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top