hi,
i have a simple database that maintains customer info in one table and their orders in another.
when adding a new order for a customer i would like the customer name and id at the top of the new order form 'formorder' when the form is opened (it is opened with the button 'baddorder' on the form 'formcustomers' )
u basically choose the customer from a drop down list on the splash screen and can view the customer info (address, telephone) with one button, add a new customer with another button, see their orders with another button, and add a new order with the last button.
----the fields for the new order form 'formorder' come from the table 'tablecustomers '
----here is the code of the add order (baddorder) button
if i set the name and customer id to come from the previous form by editing the control source (for example setting the customer name to: =Forms!formcust omers!name) the table is not updated. but if i don't change the control source the table is updated. but i need the name and id prefilled when the form is opened.
many thanks for any help!
i have a simple database that maintains customer info in one table and their orders in another.
when adding a new order for a customer i would like the customer name and id at the top of the new order form 'formorder' when the form is opened (it is opened with the button 'baddorder' on the form 'formcustomers' )
u basically choose the customer from a drop down list on the splash screen and can view the customer info (address, telephone) with one button, add a new customer with another button, see their orders with another button, and add a new order with the last button.
----the fields for the new order form 'formorder' come from the table 'tablecustomers '
----here is the code of the add order (baddorder) button
Code:
Private Sub baddorder_Click()
On Error GoTo Err_baddorder_Click
DoCmd.OpenForm "formorder", acNormal
DoCmd.GoToRecord , , acNewRec
Exit_baddorder_Click:
Exit Sub
Err_baddorder_Click:
MsgBox Err.Description
Resume Exit_baddorder_Click
End Sub
many thanks for any help!
Comment