V
VegaLA
Hi all,
I have three combo boxes om a form which should dictate to the
subform what data to display. The first cboBox works fine but then the
recordsource for the subform is set for that cbobox. However I would like the
second cbobox (I have set this for 'on gotfocus') to change the recordsource
for the subform to a query I have created for this. Problem is i'm not having
any luck with the code....
Private Sub cboName_GotFocus()
Me.cboDrive = Null
Set rstNames = "qryNetInfoStaff"
rstNames.Open "Select * From qryNetInfoStaff"
Set Forms("sfmNetInfo").Recordset = rstNames
Forms("sfmNetInfo").UniqueTable = "qryNetInfoStaff"
DoCmd.Requery "sfmNetInfo"
End Sub
Can anyone please offer me any advice to get this to work.
Mitch.....
I have three combo boxes om a form which should dictate to the
subform what data to display. The first cboBox works fine but then the
recordsource for the subform is set for that cbobox. However I would like the
second cbobox (I have set this for 'on gotfocus') to change the recordsource
for the subform to a query I have created for this. Problem is i'm not having
any luck with the code....
Private Sub cboName_GotFocus()
Me.cboDrive = Null
Set rstNames = "qryNetInfoStaff"
rstNames.Open "Select * From qryNetInfoStaff"
Set Forms("sfmNetInfo").Recordset = rstNames
Forms("sfmNetInfo").UniqueTable = "qryNetInfoStaff"
DoCmd.Requery "sfmNetInfo"
End Sub
Can anyone please offer me any advice to get this to work.
Mitch.....