Strange Error

H

Hesham Sakr

I am using a combo box on a form from which i select a code related to
another table, it has been working fine but recently it is not accepting to
save new records for the recently created codes, it responds with an error
indicating that the code i selected has no related field in the related
table????? how can i solve this... the situation is very critical??!!
 
H

Hesham Sakr

Hesham Sakr said:
I am using a combo box on a form from which i select a code related to
another table, it has been working fine but recently it is not accepting to
save new records for the recently created codes, it responds with an error
indicating that the code i selected has no related field in the related
table????? how can i solve this... the situation is very critical??!!


the error i am getting says: "The Microsoft office access engine cannot find
record in the table agents list (sc) with key matching fields (pcc)"

can any one help??
 
J

J

You need to add the "new code" to the table "agents list" before you
can use it.


Access is a relational database system. Allow me to explain how this
works with a similar scenario:
Bob is a shipper with a database. His database has two tables:
tblCustomers (Fields: CustomerIDNumber, CustomerName, CustomerAddress,
CustomerPhone)
tblOrders (Fields: Customer, OrderNumber, OrderDate, OrderDescription)

Now things are going great for Bob until one day he gets a new
customer. He tries to go straight to the order table and put in a new
order. Unfortunately, he gets the same error you're getting. Why?
Because you can't use a new customer in an order until they are added
to tblCustomers. The field "Customer" in tblOrders is RELATED to a
field in the table tblCustomers. So the right thing to do is: Step 1)
Add new customer, Step 2) use them in an order.

Obviously my example is overly simplified but I hope you can see how
it applies to your table.

~J
 
H

Hesham Sakr

I already did that, and have been doing it for adding about 40 new agents to
the agent list , so what is happening now is that it works ok for the 40 new
ones that were added but for the additional 4 that have been added recentlly
it wont work and it shows the error i reported!!
 
Top