Hello,
Well here goes, I am using Microsoft Access to design a user interface for SQL Server database, I am currntly using the project method. I have manged to link it up and get my form to show the record, but when I go to click on next record it is not showing the next record. Where you have the next buttons it shows how many records there are, in this instance there is 706, but always seems to get stuck on the first record, this is the code I have so far, have been searching the net and can not seem to find anything.
Here is my code:-
Thanks
Well here goes, I am using Microsoft Access to design a user interface for SQL Server database, I am currntly using the project method. I have manged to link it up and get my form to show the record, but when I go to click on next record it is not showing the next record. Where you have the next buttons it shows how many records there are, in this instance there is 706, but always seems to get stuck on the first record, this is the code I have so far, have been searching the net and can not seem to find anything.
Here is my code:-
Code:
Private Sub Form_Load()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = CurrentProject.AccessConnection
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = "SELECT * FROM prod_parent"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
Set Me.Recordset = rs
Me.prodcode = rs!prodcode
Me.prodtitl = rs!prodtitl
Me.price = rs!price
Me.description = rs!description
rs.Close
Set rs = Nothing
Set cn = Nothing
End Sub
Comment