Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Refreshing a page that holds a subform within a form

$
0
0
Hello good people,

I have a form with two pages within it. The first page is an interface that directs the user to enter in a value in ComboBox#1 and then the user pushes CommandButton#1 to get directed to the second page.

In this second page is a subform that holds 6 fields that are linked to a table. Some of these fields are text boxes while others are combo boxes. The idea is that the value in ComboBox#1 will be prepopulated in TextBox#1 which will in turn dictate the possibilities of the data in the combobox listed on page 2, lets call it ComboBox#2. The row source in Combobox#2 is a query that bases its results on the value from TextBox#1.

I have the first part of the process down, TextBox#1 correctly pulls the value from ComboBox#1. My Combobox#2, which is supposed to only list values that applies to the value in TextBox#1 does so. However, my success stops there. Once I go back to change the value on the first page at ComboBox#1, and then I go back to the second page, even though my TextBox#1 correctly changed, my Combobox#2 values did not. The only way I can get it to display the correct list of values is by pressing Shift+F9. However, I want the combobox to populate itself correctly but I dont know how to do this in VBA code. I have tried Me.Requery in all sorts of events for the combobox#2 and the form that the combobox is in, but no luck.

Any ideas? Questions?

Viewing all articles
Browse latest Browse all 13329

Trending Articles