|
accessman -> openRecordset (9/18/2005 18:52:58)
|
Function count_record() As Integer Dim db As Database Dim rs As Recordset Dim x As Variant Set db = CurrentDb Set rs = db.OpenRecordset("try") x = rs.RecordCount count_record = rs.RecordCount MsgBox "x is " & x Set db = Nothing Set rs = Nothing End Function What's wrong? I am using MS Access 2002 version. When I run the function, Set rs = db.openRecordset("try") doesn't work. "try" is a table name. What happen? Does anybody know how to solve? Thanks.
|
|
|
|