Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make this form using records from a different table?

Status
Not open for further replies.

idbands

Technical User
Oct 13, 2007
16
I have 2 tables - orders and orderitems. I need to make two refund tables that are exactly like orders and orderitems. I did this, no problem.

Now I have a refund form that users will use when doing an order refund that should write new records to the refund_orders and refund_orderitems tables. I want a user to open the form, enter an order number, have the original order data pull up as a starting point where the user can then adjust which items are being refunded and click "Submit" to log the refund records.

Not sure how to get the original order data to populate in the form? Do I just somehow set the default values to a query on the original order data? If someone could point me in the right direction, it would be much appreciated!

Thanks!
Kelly
 
There are lots of different ways to do it. Here is one.

1)Build an unbound main form with an unbound combo box "cmboOrders". The combo should have a row source as the orders. You can then type in the combo and it should find the correct order to select.
2)Build a subform with your order information / order detail information.
3)Link the subform to the combo box in the properties of the subform control. Something like
link Master: [cmboOrders]
link Child: orderID

Change the value in the combo box and the subform will show the correct order
 
PS the form wizard will not let you link an unbound form to a subform. You will have to edit the values of the subform control manually.
 
How are ya idbands . . .

Perhaps an autolookup query would do. In access help search for [blue]autolookup queries[/blue]

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top