Initial Combo Selection NOT Refreshing Subform(s)

  • Thread starter Thread starter Mike Sims
  • Start date Start date
M

Mike Sims

Hello, I have a form with a couple of combo boxes and two sub forms.
When a user types in a part number in the combo box, and hits enter, the
lower subform does not refresh. However, if they hit the down arrow,
and choose another part number, it refreshes just fine, and from that
point forward, it works great with every selected (or typed) part
number. It is only the first part number selection after opening the
main form that does not properly refresh the second subform.

Any ideas? Here is the combo AfterUpdate event if your interested (It
is the frmSubNonGuv subform that is problematic):

Private Sub ComboPartNum_AfterUpdate()

ComboPartNum.Value = UCase$(ComboPartNum.Value)
strSubLinkForm = "frmNonGuvQuotes"
strSubLinkData = "[PART_NUM] = '" & Me!ComboPartNum & "'"
strCombo = "PART_NUM"

frmSubGuv.Filter = "[PART_NUM] = '" & Me!ComboPartNum & "'"
frmSubNonGuv.Filter = "[PART_NUM] = '" & Me!ComboPartNum & "'"
frmSubGuv.FilterOn = True
frmSubNonGuv.FilterOn = True

End Sub
 
You could try an explicit requery, that should force it to update if it
refuses to do so on its own:

Private Sub ComboPartNum_AfterUpdate()

ComboPartNum.Value = UCase$(ComboPartNum.Value)
strSubLinkForm = "frmNonGuvQuotes"
strSubLinkData = "[PART_NUM] = '" & Me!ComboPartNum & "'"
strCombo = "PART_NUM"

frmSubGuv.Filter = "[PART_NUM] = '" & Me!ComboPartNum & "'"
frmSubNonGuv.Filter = "[PART_NUM] = '" & Me!ComboPartNum & "'"
frmSubGuv.FilterOn = True
frmSubNonGuv.FilterOn = True
Me.Requery
End Sub



Jon
 
I tried all the refresh stuff - even tried refreshing each subform
individually.

Its an odd problem for sure.
 
What happens if you explicitly call a requery on the misbehaving subform?

Me.sfmMisbehaving.Form.Requery



That might be worth a try.



Jon
 
Back
Top