sourceObject Property dbo

  • Thread starter Thread starter Stephan Gehrlein
  • Start date Start date
S

Stephan Gehrlein

but this way I would have to generate a form for each table I want to open,
don't I??

I am choosing table names from a combobox out of 70 or 80 tables.... (;-<)

Any other workaround? Or am I wrong that I would have to generate a form for
each table?

Stephan
 
I assume you are talking about the SourceObject Property
of a Subform Control and not the Unbound Object Frame.
You original statement:

myform.sourceObject = "Table.dbo.mytable"

won't work as Forms don't have the SourceObject Property.

Just for completeness I did a quick and dirty Form /
Subform in an ADP and set the SourceObject of the Subform
Control to simply

Table.tblFactory

and it worked fine.

I then used code:

Forms!Form1!Child2.SourceObject = "tblWarehouse"
Forms!Form1!Child2.SourceObject = "Table.tblFactory"
Forms!Form1!Child2.SourceObject = "Table.tblWarehouse"

in turn and each statement worked fine. Since I am the
SQL Administrator, Database owner as well as the Access
Developer, I have access to everything so I am not sure
whther these work for normal users.

HTH
Van T. Dinh
MVP (Access)
 
but this way I would have to generate a form for each table I want to open,
don't I??

I am choosing table names from a combobox out of 70 or 80 tables.... (;-<)

So my next question would be - why? Generally, a design that calls for
selecting between a set of tables with the same structure needs to be
normalized into one table with one more field added to distinguish the
groups. Then, you can just filter on the group to get the records you are
looking for.

- Steve Jorgensen
 
Back
Top