gary.newport
Registered User.
- Local time
- Today, 09:20
- Joined
- Oct 14, 2009
- Messages
- 79
I have a table called tbl_courses. This currently has 3 complete records in it (3 courses).
I have a form with a textbox; the textbox is called txt_course_total.
I want the textbox to show the total number of courses currently stored.
I wrote the following:
I am expecting 3 but I get 1. Not -1 but 1.
Why?
I have a form with a textbox; the textbox is called txt_course_total.
I want the textbox to show the total number of courses currently stored.
I wrote the following:
Code:
Dim rst_courses As Recordset
Set rst_courses = CurrentDb.OpenRecordset("SELECT * FROM tbl_course")
txt_course_total.Value = rst_courses.RecordCount
I am expecting 3 but I get 1. Not -1 but 1.
Why?