Form #1 that filters form #2

J

Jennifer

I have a form #1 customers and form #2 orders. I put a button on form #1 to
open form #2 filtered but customerID. However, when I go to data enter the
second...tenth customers the order form does not save the information into
table or form. What am I doing wrong and How can I correct this problem?
 
J

John W. Vinson

I have a form #1 customers and form #2 orders. I put a button on form #1 to
open form #2 filtered but customerID. However, when I go to data enter the
second...tenth customers the order form does not save the information into
table or form. What am I doing wrong and How can I correct this problem?

We cannot possibly tell what you're doing wrong because you have not told us
what you're doing.

Please post your code and the Recordsources of the two forms. If the
recordsource is a Query post the SQL view of the query; if it's a table, post
the relevant fieldnames.
 
R

Rockn

Is the second form bound to the table you are trying ot update? You either
have to bind the form to the table or use some code to update the orders
table.
 
J

Jennifer

Here is what I am doing. I have 2 forms Customer Form and Orders Form each
has their table Tbl Customers and TblOrders. On the Cumstomer Form I created
a Command buttom to open the Orders form I used the Command Button Wizard. I
get to where the button can open the form and find specific data to display
or open the form and show all the records. I want the form to be filtered by
CustomerID so I picked Open the form and find specific data to display. I
want to data enter the new information for a new order. Next the wizard ask
me to match the fields that the buttom can use to look up the information. I
did CustomerID. Then it created the buttom. However, It will save the first
customer's data (CustomerID Number 1) but when I have to enter the
information for customer number 2 the data is lost once I have exited the
form.

I have done with a relationship of one to Many with join choice #1, did this
with no relationship and with the different joins.

There should be a way to make this work? Please help!
 
J

Jennifer

I get this after the button is created and I start data entering in to the
Orders form. " The changes you requested to the table were not successful
becuase they would create duplicate values in the index,Promary Key or
relationship. Changes the data in the field or fields that contain duplicate
data, removed the index, or redefine the index to permit duplicate entries
and try again." I have no relationship in the relationship window. On the
Procedure table I made CustomerID a yes (Yes to duplicates). I am not sure
what to do now. Jennifer
 
J

Jennifer

I an not understanding what you are asking. The customer form comes from the
customer table and the orders form comes from the orders table. I created the
forms by using the tables. the orders form and table does have the customerID
with index as yes(duplicates OK). Then when I created the button on the
customer form I asked it to filter by customerID in the command wizard. But
it does not save anything after the first record on the orders form. I have
no relationship in the relationship window. I did try it with a relationship
but it did not make a difference. I don't know why I keep getting the message
that the index, or primary key is dulpicated and unable to save the
information. However, when I look at the idexes I see nothing that is
duplicated. I am lost. Jennifer
 
J

John W. Vinson

I get this after the button is created and I start data entering in to the
Orders form. " The changes you requested to the table were not successful
becuase they would create duplicate values in the index,Promary Key or
relationship. Changes the data in the field or fields that contain duplicate
data, removed the index, or redefine the index to permit duplicate entries
and try again." I have no relationship in the relationship window. On the
Procedure table I made CustomerID a yes (Yes to duplicates). I am not sure
what to do now. Jennifer

Please post information about the actual structure (name, fieldnames, Primary
Key if any) of your tables, and the Recordsource properties of your form and
subform.
 

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