DCrake
Remembered
- Local time
- Today, 18:21
- Joined
- Jun 8, 2005
- Messages
- 8,632
I have a main form that contains a sub form and a list box, the list box will contain a list of tables from a database selected by the user.
When the user clicks on a table in the list box I want the subform to show the contents of the chosen table in datasheet view.
The issue I have is I need to set the subforms control source on the fly. I cannot prepopulate the subform with fields as I do not know what the name of the table is going to be and how many and what type of fields are going to be populated.
I have got this working by populating a listbox dynamically but I really want more flexibility with the column widths etc.
I can populate a third party ocx listbox but the end result is going to be posted here as part of a database comparison wizard and as such do not want to deploy 3rd party ocx's.
Tried Microsoft Flexgrid but Access 2007 do not allow me to reference it as it states it does not support it in this version. Another solution is to use a VSFlexgrid but again I really want to keep it purely in Access.
Does anyone have a solution that would enable me to feed control source information to an empty subform?
When the user clicks on a table in the list box I want the subform to show the contents of the chosen table in datasheet view.
The issue I have is I need to set the subforms control source on the fly. I cannot prepopulate the subform with fields as I do not know what the name of the table is going to be and how many and what type of fields are going to be populated.
I have got this working by populating a listbox dynamically but I really want more flexibility with the column widths etc.
I can populate a third party ocx listbox but the end result is going to be posted here as part of a database comparison wizard and as such do not want to deploy 3rd party ocx's.
Tried Microsoft Flexgrid but Access 2007 do not allow me to reference it as it states it does not support it in this version. Another solution is to use a VSFlexgrid but again I really want to keep it purely in Access.
Does anyone have a solution that would enable me to feed control source information to an empty subform?