I am creating a form to enter data into a table. I want to be able to enter several records where certain fields are identical without having to re-enter those fields every time. I've added unbound edit boxes for the user to enter the data that may not change for several records (e.g. Customer and Date). I use those fields to create a query to be used as the record source for a subform (for which the 'Link Child Fields' and Link Master Fields' properties are set to null). What I have so far displays existing data just fine. If I enter an existing customer/date combination, the subform populates with the correct data. What I want to be able to do now is use the subform to enter a new record.
As you probably predicted, the record created using the subform contains all the data entered in the subform, but the fields represented by the unbound edit boxes in the main form are unpopulated. How can I force the new records to contain the data used as criteria for the query defining the subform? I've tried adding code to the AfterInsert event of the subform, but that causes my code creating the subforms data source to not work.
Any help (including solutions completely different from what I'm attempting) would be greatly appreciated.
Don
As you probably predicted, the record created using the subform contains all the data entered in the subform, but the fields represented by the unbound edit boxes in the main form are unpopulated. How can I force the new records to contain the data used as criteria for the query defining the subform? I've tried adding code to the AfterInsert event of the subform, but that causes my code creating the subforms data source to not work.
Any help (including solutions completely different from what I'm attempting) would be greatly appreciated.
Don