Using a Combo Box to Select Subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want: The user selects a table name from a combo box (cboSelectTable), then
the appropriate datasheet is displayed in the subform (sfmDatasheet) below.

I tried the following code in the combo box's After Update Event, but I got
a runtime 3011 error:
sfmDatasheet.SourceObject = Me.cboSelectTable.Value

Any suggestions?
 
DevDaniel said:
I want: The user selects a table name from a combo box
(cboSelectTable), then the appropriate datasheet is displayed in the
subform (sfmDatasheet) below.

I tried the following code in the combo box's After Update Event, but
I got a runtime 3011 error:
sfmDatasheet.SourceObject = Me.cboSelectTable.Value

Any suggestions?

No need to post the same message twice, so close together.

In your code, use:

Me.sfmDatasheet.SourceObject = "Table." & Me.cboSelectTable.Value
 
Back
Top