Using a Combo Box to Select a Subform

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

Guest

I want: User selects a table name from a combo box (cboSelectTable). The
appropriate datasheet opens in a subform (sfmDatasheet) below.

I tried using the following code in the combo box's AfterUpdate event, but
got a 3011 error:
sfmDatahseet.SourceObject = Me.cboSelectTable.Value

Any suggestions?
 
You mentioned "Table Name", you need to select a form name, Access is looking
for a form, and not a table
===================================
If that not the case, then
Try and add Me

Me.sfmDatahseet.SourceObject = Me.cboSelectTable
=====================================
Also, check if the row source of the combo include more fields, and the
FormName field is not the bounded one
 
Back
Top