Assigning value from one form to another

filo77

Registered User.
Local time
Today, 16:55
Joined
Jul 13, 2004
Messages
16
Hey,

I have a problem with assigning a field value from one form to another form.

I have a form called Orders. On this form I make selections such as Vendor ID, Order Date, etc. But since many items can be part of a particular order I have created another form that is called Invoice and this is where I input all the order details such as price, quantity, discounts, etc.

Both forms record new records in two different tables. The Order form records data in the Order table, and the Invoice form records data in the OrderDetails table (associative entity).

So on the Order form I have a drop down menu for my Vendors (pulled from the Vendor table) and I start entering data about the new order (data such as shipping, any order data that should not be in the OrderDetails table).

Now, when I am done with the new order entry on the Order form I click a button that takes me to the Invoice form. On this form I have Vendor ID pulled from the previous form, and I also want to "pull" the OrderID from the same previous table, so I can store them in the OrderDetails Table. The problem is that OrderID is an autonumber and when I get transferred to the Invoice form the OrderID field is null, which prevents me from saving any data in the OrderDetails table.

In other words my question is: How do I show/transfer the value of an autonumber field from one form to another when the autonumber field gets to null automatically when I save the record???

Please help.

filo
 
Have you tried to save the record 1st when you click the button to open the other form then open it. You should be able to use =Forms!the1stFormName.Form!OrderID in the OrderID field of your 2nd form, provided the 1st form is still open!
 
Thanks

I found a way. It was easy.

Thank you very much.

filo
 

Users who are viewing this thread

Back
Top Bottom