B
Bob Richardson
My form has a combobox and a subform. When I click a value in the combobox
(ClassCodeCombo) I want a different record to appear in the SUBFORM.
Instead, I get the correct record to appear in a brand new form which floats
above the main form (with the old subform still visible). I guess this is
obvious because I said "DoCmd.OpenForm" So my question is, what command do
I want rather than OpenForm?
Here's the VB from my OnCLick Event:
On Error GoTo Err_EventBtn_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ClassInfo"
stLinkCriteria = "Classes.ClassCode='" & Me!ClassCodeCombo & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_EventBtn_Click:
Exit Sub
Err_EventBtn_Click:
MsgBox Err.Description
Resume Exit_EventBtn_Clic
(ClassCodeCombo) I want a different record to appear in the SUBFORM.
Instead, I get the correct record to appear in a brand new form which floats
above the main form (with the old subform still visible). I guess this is
obvious because I said "DoCmd.OpenForm" So my question is, what command do
I want rather than OpenForm?
Here's the VB from my OnCLick Event:
On Error GoTo Err_EventBtn_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ClassInfo"
stLinkCriteria = "Classes.ClassCode='" & Me!ClassCodeCombo & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_EventBtn_Click:
Exit Sub
Err_EventBtn_Click:
MsgBox Err.Description
Resume Exit_EventBtn_Clic