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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Navigation buttons on an unbound form

Status
Not open for further replies.

Katy44

Technical User
Dec 12, 2003
723
GB
I have a recordset which is filled iin my VBA by running a SQL Server stored procedure.
I am then trying to display the returned records on a form. I have put navigation buttons at the bottom, and I want to display one record per 'page' i.e. navigate through the records using the buttons. I just can't get this to work!!
I fill the recordset, and then fill each field on my form with a field from the recordset:

With Form_MyForm
.Field1 = rs("Field1")
.Field2 = rs("Field2")
...etc

What else needs to be done to make the navigation buttons scroll through all the records in the returned recordset? At the moment, it seems to just display the first one, which looks fine, but the nav buttons are greyed out.

 
This was caused by a few properties of the recordset that weren't correct (the defaults needed to be changed)
I'll post the exact details on Monday.
 
The syntax was:

Code:
rs.CursorLocation = adUseClient
    
rs.Open sqlCmd2, , adOpenKeyset, adLockOptimistic


(rs is an ADODB recordset)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top