Hi,
I am getting two different results between a parameter query and a filtered query. I have a Main form/Subform. The subform Data Entry=Yes. Using the parameter query as the record source when I open the form, only those records that meet the criteria are show in the Main form and the subform just shows a new record. Just what you would expect.
I want to use the form for several types of entry, so I created several button that run OpenForm with the same query as record source, then apply a filter query. I get the same records on the Main form as I got using the parameter query. The first record in the Main form has a corresponding new record in the subform (Data Entry=Yes). If I move to the next record on the Main form, the subform displays previously entered data, not just a new record. If I move back to the first record on the Main form, the subform now also shows previously entered data.
If anyone can explain what is going on I would love to hear from you. I had written a procedure that, depending on the filter query, made controls on the Main form visible or invisble, thus I can use a "universal" entry form that changes at run time. The only code on the subform is setting a default for a new record on the BeforeUpdate event. Removing this code had no impact on my problem, and it runs fine with the parameter query.
-Tom
I am getting two different results between a parameter query and a filtered query. I have a Main form/Subform. The subform Data Entry=Yes. Using the parameter query as the record source when I open the form, only those records that meet the criteria are show in the Main form and the subform just shows a new record. Just what you would expect.
I want to use the form for several types of entry, so I created several button that run OpenForm with the same query as record source, then apply a filter query. I get the same records on the Main form as I got using the parameter query. The first record in the Main form has a corresponding new record in the subform (Data Entry=Yes). If I move to the next record on the Main form, the subform displays previously entered data, not just a new record. If I move back to the first record on the Main form, the subform now also shows previously entered data.
If anyone can explain what is going on I would love to hear from you. I had written a procedure that, depending on the filter query, made controls on the Main form visible or invisble, thus I can use a "universal" entry form that changes at run time. The only code on the subform is setting a default for a new record on the BeforeUpdate event. Removing this code had no impact on my problem, and it runs fine with the parameter query.
-Tom