Gloria,
 
When I've done this in the past, I copied the BWS modules over to my VB6 project.  Then I added the Boston Workstation .dll to my References.  Then you don't have to do everything in runtime.  I don't use BWS anymore, but I still get the emails
 

Jeff McClain
Controller
Memorial Hospital
1101 Michigan Avenue
Logansport, IN  46947
(574) 753-1732
[EMAIL PROTECTED]



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich McNeil
Sent: Monday, April 04, 2005 1:47 PM
To: [email protected]
Subject: RE: [Talk] DataGrid Control

Gloria,

 

I see what your saying about the differences in VB6 and VBA.  I suspect that you’ll be able to set the DataSource property (which is itself an object) in your script with a

 

            Set DataGrid1.DataSource = ???

 

Statement.  This is copied from VB’s help:

 

DataSource Property (ActiveX Controls)

Returns or sets a data source through which a data consumer is bound to a database.

Syntax

object.DataSource [=datasource]

The DataSource property syntax has these parts:

Part

Description

object

An object _expression_ that evaluates to an object in the Applies To list.

datasource

An object reference that qualifies as a data source, including ADO Recordset objects, and classes or user controls defined as data sources (DataSourceBehavior property = vbDataSource). 

 

Remarks

Use the Set statement to set the DataSource property, as shown below:

Set DataGrid1.DataSource = ADODC1

Note   Two older controls, the Data control and RemoteData control, can be used as data sources, however you cannot set the DataSource property of another control or object to either of these controls at run time. For example, the following code will fail:

Set Text1.DataSource = Data1    ' Will fail! You can't set DataSource at 
                              ' run time to an intrinsic Data control.

To use either the Data control or RemoteData control as a data source, you can set the DataSource property of bound controls at design time only.

 

 

Rich McNeil

Boston Software Systems

866 653 5105

www.bostonworkstation.com


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gloria Mallory
Sent: Monday, April 04, 2005 1:10 PM
To: '[email protected]'
Subject: [Talk] Datagrid Control

 

 

When I place a datagrid control on a userform in BWS, it does not include the datasource property so I am using the datamember property instead; however, when I place a datagrid control on a form in Visual Basic, I do see the datasource property.  When I run the VB code, the datagrid is populated with a list of physician mnemonics; however, it will not populate in BWS.

 

Does anyone have any ideas on correcting my problem?

 

Thank you for your assistance.

 

Gloria Mallory

Good Shepherd Medical Center

903 315-5120

 

Reply via email to