Unanswered: adding record using form linked to another form
I have a form customers form that brings up a projects form with the project records that have the customerID from the one chosen in the first form (customers from the customers table) - when I do an insert it adds the record that I want (from the projects form I filled out) - but it does not add the customerId field - I want it to remember it from the first form - how do I do this?
thanks - JS
(below explains the same thing in a question I asked via email to someone - disregard if the above problem was clear already)
I can view all the record in the forms ok when they already exist in the table, but I am having trouble adding new ones
When I go from the customers form and click the button to go to the projects form, but there is no project already existing for that customer, I fill out the form, but it doesn't know the customerID from the first form to do the insert with - it adds a record into the projects table fine, but the customerID field in the project is null and so the record in the project table is in no way associated with the customer (since the way they are joined is by the field CustomerID that exists in both tables)
can't do it as a subform - biggest reason is that the form needs to bring up another form that brings up another form..... so since it is like 4 forms/tables deep, I think using a new form technique is better....
You may want to write a procedure to copy the current value in the customer number field on the customer form, then open the project form, then paste the value into the customer number field on the project form. You could then assign the button on your customer form (that currentlly just opens the project form) to this new procedure. You would then just need to enter the remaining information about the new project just as you do now.