Hello everyone
On my database I have a form and on this form I have a text box, a list box and a subform. On the subform I have two combo boxes and a text box and the subform is set to datasheet view. The list box on the main form is unbound and I use it to filter the underlying query for the row source of the two combo boxes on the subform. The main form has a one to many relation with the subform. I also have an onclick event on my list box to filter the combo boxes on my subform if I needed to enter more than one record on my subform. So the process goes as follows:
Starting with the main form:
1. Enter a value on the text box
2. Pick a value on the unbound list box to filter the two combo boxes on the subform
Moving to the subform:
1. pick a value for the two combo boxes
2. enter a value for the text box
Now here is what I am facing an issue with:
Suppose now I needed to enter another record on the subform, I would have to move back to the main form to select another value from the list box to filter the underlying query of the two combo boxes on the subform. When I do that and the onclick event fires up, the datasheet on my subform looks really awkward. The columns for the two combo boxes are empty now, but the value on the text box is still there. This confuses the user. Now the user does not know where to enter the new record. How can I filter the underlying query of the combo boxes on the subform and keep the previously entered data ?