Joined: 27 Feb 2007
Location: Eastbourne, UK
|Posted: Tue Feb 27, 2007 12:12 pm Post subject: How to auto-fill form fields using an ID field on the form?
I haven't done anything IT related in years, but I need to get a fairly basic database going to track patient's orders and repairs, and I'm finding it really difficult.
So far, the order details are entered into an Orders table and include OrderNumber, PatientName, OrderDate, Manufacturer, and ProductName. One OrderNumber may have two OrderDates, as an order may be made in two parts.
When the product is received, the DateReceived and SerialNumber(s) (for multiple items) are added.
I have designed a form for entering new orders, and one which is based on a query which returns any order over 7 days old which hasn't been received. So far, so good.
Now I want to track repairs, using a separate Repairs table. The repairs table only needs the original OrderNumber, the SerialNumber(s) (in case only one of several is sent back), DateRepairSent, TrackingNumber and DateRepairReceived.
If a product is sent back for repair, I want to enter the original order number on a form and for it to query the Orders table and auto-fill the SerialNumber(s), and to also show the PatientName, Manufacturer, and ProductName in a subform. I have tried searching the Base and Code Snippets forums, but can't find what I'm looking for, or at least can't understand the answers which have been given. That's no slight on the postings, it's more my poor level of understanding!
Once the information is in, I can design a form based on a query to see any outstanding repairs.
I'm fairly confident about designing the forms and queries, but I am completely stuck on how to auto-fill the form fields, and really need some help.
Also, how would I use data from both tables to show the entire history of an order using the OrderNumber?
Many thanks for your help,