By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,315 Members | 1,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,315 IT Pros & Developers. It's quick & easy.

error 7965 not a valid recordset property

P: n/a
Dear All,

Access2000.adp connected to SQL-server 2000
MainForm unbound: seachform on companies meeting a complex combination of
SubFrom and ListBox to display the searchresult ( 2 outputs to test what's

Searchresult is stored in a creatable ADO-recordset (see code) and then
1. Converted to string (GetString) to be set as valuelist for a listbox.
2. bound to the subform.

The Listbox shows the resultdata correctly but is limited in length.
The subform shows the records but all fields are empty or displays #error
How should I bound the controls correctly to display the fieldvalues?
If I let them unbound the show up empty.
If I set them to the recordsets' fieldnames it show #error.

On my Notebook using MSDE there is no errormessage
On my Desktop i get error 7965 not a valid recordset property.

CAN'T FIND WHAT'S WRONG! Cursortype ??



'Store result in creatable ADO-recordset: Add fields
With ResultRS
With .Fields
.Append "CompID", adInteger
.Append "CompName", adVarChar, 255
.Append "BasicPrice", adVarChar, 255
End With
.CursorLocation = adUseClient
.CursorType = adOpenStatic
End With
Code for Search

'Set Rowsource Listbox and subform
If ResultRS.RecordCount > 0 Then
strSearchResult = ResultRS.GetString(adClipString, , ";", ";")
Me.Formulier1.Form.Visible = True
Set Me.Formulier1.Form.Recordset = ResultRS
Me.CmbSearchResult.Visible = True
Me.CmbSearchResult.RowSource = strSearchResult
End If
'Clear memory
If rs.State = adStateOpen Then
Set rs = Nothing
End If
If ResultRS.State = adStateOpen Then
Set ResultRS = Nothing
End If
Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.