|
-
Sep 23rd, 2000, 02:26 PM
#1
Thread Starter
Dazed Member
Hi all! I keep getting a runtime error when i click
the cmdPrevious button but for some reason when the
Next Button is clicked there is no runtime error generated?
Why is that. And when the last record is reached no msgbox pops up. Why is that? Thanks
Private Sub cmdNext_Click()
Set db = OpenDatabase("C:\ToolBox\CompanyInventory97.mdb")
Set rs = db.OpenRecordset("ProductDecrption")
If rs.EOF Then
MsgBox "This is the end of the records"
Else
rs.MoveNext
txtProductID.Text = rs![Product ID]
txtName.Text = rs!Name
txtColor.Text = rs!Color
End If
rs.Close
End Sub
Private Sub cmdPrevious_Click()
Set db = OpenDatabase("C:\ToolBox\CompanyInventory97.mdb")
Set rs = db.OpenRecordset("ProductDecrption")
If rs.BOF Then
msbox "This is BOF"
Else
rs.MovePrevious
txtProductID.Text = rs![Product ID]
txtName.Text = rs!Name
txtColor.Text = rs!Color
rs.Close
End Sub
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
|