Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSHFlexGrid Control Run-Time Error 30023

Status
Not open for further replies.

jsparks

Programmer
Jan 3, 2001
14
US
I have an MSHFlexGrid Control on my form. The user types in a page number. on the return keypress, a connection to the database is made and a select statement is executed. the results from the select statement are to appear in the MSHFlexGrid control. (MSHFlexGrid1.DataSource = RS)

The first row of the grid is getting all of the field names from the database table. However, the rows of data beneath are not getting populated, and I'm getting a run time error 30023... Unable to access data. DatSource settings may be incorrect or the DataSource functionality may be limited. See help for more information.

The help for this topic also errors out, figures.

Any suggestions? Here's how I'm trying to do it....


------------
Private Sub txtC2001ViewPage_KeyPress(KeyAscii As Integer)

If KeyAscii = 8 Then
txtC2001ViewPage.Text = ""
End If

If KeyAscii = 13 Then

KeyAscii = 0

Dim PageText As String
PageText = txtC2001ViewPage.Text

Set CN = New Connection

CN.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=\\NTS02\WEISSMANS\DATABASE\xxx.mdb;xxx;xxx;'")

Set RS = New Recordset
RS.Open "select * from catalog_c2001 WHERE PAGE = '" & PageText & "'", CN, adOpenForwardOnly, adLockReadOnly

Set MSHFlexGrid1.DataSource = RS



.....................
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top