WindSailor
Registered User.
- Local time
- Yesterday, 22:33
- Joined
- Oct 29, 2003
- Messages
- 239
I have a main form in which I have 2 subforms in tabulated form on it.
The subforms are all of off the same table through 2 different queries, pulling at least one piece of data from the previous subform and then applying it to that particular subform.
Main table
“Name” “W value” “X value” “Y value” “Z value”
Sub1
“Name” “W value” “X value”
Sub2
"Name" "X value" "Y value"
I have a combo box on the main form which is linked to all of the subforms and sorts accordingly, and the “W”, “X”, “Y” values on the subforms are to be listed ascending. This works great.
The problem that I am having is when I change an “X value” in Sub1 to have a greater value than 0, the newly listed item that now should be displayed in Sub2 is not shown, also the values that did change, were not correctly sorted (Sub2, criteria for “X value” has to be >0 and it is to sorted ascending; otherwise it would list unwanted items). The only way I can get Sub2 to correctly list the items is to close and reopen the main form.
The multiple subforms are required because of the extra data pulled from the query(s) to make an adequate decision on the input option.
I have tried on the AfterUpdate event of “X value” on the main Sub1 form to insert or use…
Forms!MainFormName!SubFormName.Form.Requery
But oddly enough I can’t seem to get the MainFormName correct or it will not recognize it. I have more than one form built off the main table (maybe it is naming conventions now that I think of it). I have tried to requery Sub2 using the click event on the tab for that subform, but still no success ((Me.Sub2.Requery) still will not reload that subform correctly).
I have tried looking through the forum, but I just couldn’t apply what I found or I totally missed the boat.
Any input would be appreciated.
Thanks.
The subforms are all of off the same table through 2 different queries, pulling at least one piece of data from the previous subform and then applying it to that particular subform.
Main table
“Name” “W value” “X value” “Y value” “Z value”
Sub1
“Name” “W value” “X value”
Sub2
"Name" "X value" "Y value"
I have a combo box on the main form which is linked to all of the subforms and sorts accordingly, and the “W”, “X”, “Y” values on the subforms are to be listed ascending. This works great.
The problem that I am having is when I change an “X value” in Sub1 to have a greater value than 0, the newly listed item that now should be displayed in Sub2 is not shown, also the values that did change, were not correctly sorted (Sub2, criteria for “X value” has to be >0 and it is to sorted ascending; otherwise it would list unwanted items). The only way I can get Sub2 to correctly list the items is to close and reopen the main form.
The multiple subforms are required because of the extra data pulled from the query(s) to make an adequate decision on the input option.
I have tried on the AfterUpdate event of “X value” on the main Sub1 form to insert or use…
Forms!MainFormName!SubFormName.Form.Requery
But oddly enough I can’t seem to get the MainFormName correct or it will not recognize it. I have more than one form built off the main table (maybe it is naming conventions now that I think of it). I have tried to requery Sub2 using the click event on the tab for that subform, but still no success ((Me.Sub2.Requery) still will not reload that subform correctly).
I have tried looking through the forum, but I just couldn’t apply what I found or I totally missed the boat.
Any input would be appreciated.
Thanks.