I know I'm going about this completely the wrong way, so please help me with this if you can...
I have written a database that handles Computer Repairs.
When a new customer comes along, I go to the Switchboard, click "New Customer" and a form opens at a new record. I type in their details in the main form and in a subform, I type whatever computer(s) they have given me to repair. At the bottom right corner of the Computer subform is a button for New Repairs.
How do I assign the button to open the "Repair" form and create a new record, using the CustomerID and ComputerID in the Computer subform, without using a parameter query that looks at the text boxes on the Computer subform?
At the moment, I use a macro to open the form, go to a new record and set the value of "CustomerID" and "ComputerID" to whatever is written in the Computer subform. The problem is that, in order for it to work, I have to close the Computer subform manually and re-open it, else I get an Action Failed error. I've inserted DoCmd.RunCommand acSaveRecord into the button's event, but that doesn't make a difference, nor does programming the macro to close the Computer subform for me.
Many thanks to anyone who can help!
I have written a database that handles Computer Repairs.
When a new customer comes along, I go to the Switchboard, click "New Customer" and a form opens at a new record. I type in their details in the main form and in a subform, I type whatever computer(s) they have given me to repair. At the bottom right corner of the Computer subform is a button for New Repairs.
How do I assign the button to open the "Repair" form and create a new record, using the CustomerID and ComputerID in the Computer subform, without using a parameter query that looks at the text boxes on the Computer subform?
At the moment, I use a macro to open the form, go to a new record and set the value of "CustomerID" and "ComputerID" to whatever is written in the Computer subform. The problem is that, in order for it to work, I have to close the Computer subform manually and re-open it, else I get an Action Failed error. I've inserted DoCmd.RunCommand acSaveRecord into the button's event, but that doesn't make a difference, nor does programming the macro to close the Computer subform for me.
Many thanks to anyone who can help!