F
frankos
Guest
Hi guys, I have the following problem:
I have a form which contains within it a subform, the subform being a continuous one.
The form and subform are linked by a reference number. However the reference numbers are stored in a funny format, so they cannot be linked via wisards, but raher through the use of SQL.
I have developed an SQL statement that works and put it in the FORM_LOAD() property of the subform. This means that when the main form loads and displays the first record, the subform displays the correct subrecords as defined by my SQL statement.
So far so good, but here is where my problem lies:
When I navigate to the second record in the main form, the subform is NOT updated, but rather shows the results of the first record still. I assume I have to place the SQL statement (with some code) in a subform event, but I don't know which one.
Basically what I want to know is how can I get the subform to update when the main form is navigated?
Any help is much appreciated.
I have a form which contains within it a subform, the subform being a continuous one.
The form and subform are linked by a reference number. However the reference numbers are stored in a funny format, so they cannot be linked via wisards, but raher through the use of SQL.
I have developed an SQL statement that works and put it in the FORM_LOAD() property of the subform. This means that when the main form loads and displays the first record, the subform displays the correct subrecords as defined by my SQL statement.
So far so good, but here is where my problem lies:
When I navigate to the second record in the main form, the subform is NOT updated, but rather shows the results of the first record still. I assume I have to place the SQL statement (with some code) in a subform event, but I don't know which one.
Basically what I want to know is how can I get the subform to update when the main form is navigated?
Any help is much appreciated.