|
-
Jul 5th, 1999, 01:22 PM
#3
New Member
I've been looking a little bit more into your problem. I suggest that instead of using the Data Environment you should Assign a Recordset to The DataSource property of the DataReport. I tried this:
Private Sub Command1_Click()
Dim conCD As New ADODB.Connection
Dim rsCD As ADODB.Recordset
conCD.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=e:\msdn cd\index.mdb"
conCD.Open
Set rsCD = New ADODB.Recordset
rsCD.Open "SELECT * FROM cd_assys", conCD, adOpenDynamic, adLockPessimistic, adCmdText
Set DataReport1.DataSource = rsCD
DataReport1.Show
End Sub
Don't forget to make a referens to Microsoft Active Data Objects first. And assign a DataField name for the text box in the report.
//Niklas Jarl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|