Hi, im creating a rental form for a company and i have a problem which i have spent like 2 weeks trying to figure it out.
I have a drop down box which selects a product to rent, after that i have 3 option buttons to choose how long the cutomer wants to rent the product for which then links to the product prices in the product table.
Now the problem, i want to create a button that will then load up a subform with:
the selected product
the return date
and how much it is going to cost.
I think you can solve this problem with a Main-Form Sub-Form approach, rather than struggling with the Command Button.
1. Let the Drop-down control have the Product selected.
2. Instead of the Option Group control (that will have only value 1,2,3), use another control like a Text Box that can hold the rental period value that can match in the Product Table.
3. Design a Sub-Form (preferably in datasheet view) and insert below the controls specified in step-1 & 2 above.
4. Display the Property Sheet of the Sub-Form.
5. Enter the Main Form Control Names (Product;Period) in the Link Master Field Property.
6. Enter its corresponding Field Names in the Source Table of Sub-Form in the Link Child Field Property.
7. Save the Forms.
When you select a Product and period on the Main-Form its corresponding information from the Product Table will display in the Sub-Form automatically.