K
keith.hyland
Hi,
I am trying to create a userForm on a word doc that gets populated with
data from an Odbc data source.
I have recoreded a VBA macro where I retrieve the data from the
datasource, and insert it onto the page (using the
ActiveDocument.Range.InsertDatabase construct). So I have the code for
making DB connection, and the SQl code ready to go.
The problem is that I want to have this data appear in a ListBox (or
some other element which allows the user to select a single row) on a
UserForm not on the page itself.
Looking at the documentation the InsertDatabase function needs to be
called on a Range object.. I am trying to access a Range object on the
UserForm but can't seem to find one. Is there a way I can access a
Range object on a UserForm?
Or is there some other way I can call the InsertDatabase function to
insert the data onto a UserForm.
Or is there another way instead of the InsertDatabase function to
access the data in the database?
Cheers,
Keith
I am trying to create a userForm on a word doc that gets populated with
data from an Odbc data source.
I have recoreded a VBA macro where I retrieve the data from the
datasource, and insert it onto the page (using the
ActiveDocument.Range.InsertDatabase construct). So I have the code for
making DB connection, and the SQl code ready to go.
The problem is that I want to have this data appear in a ListBox (or
some other element which allows the user to select a single row) on a
UserForm not on the page itself.
Looking at the documentation the InsertDatabase function needs to be
called on a Range object.. I am trying to access a Range object on the
UserForm but can't seem to find one. Is there a way I can access a
Range object on a UserForm?
Or is there some other way I can call the InsertDatabase function to
insert the data onto a UserForm.
Or is there another way instead of the InsertDatabase function to
access the data in the database?
Cheers,
Keith