G
Gibson
The code below generates a "Type Mismatch" error on the last line. Any idea
why? The filed in the recordset, "Text1" is a text field in the table and
the variable lgNum is dimmed to Long. What am I misunderstanding about this
process.
Dim lgNum As Long
Dim rs As Recordset
Dim Db As Database
Set Db = CurrentDb()
Set rs = Db.OpenRecordset("qry1", dbOpenDynaset)
rs.MoveLast
lgNum = CLng(rs!Text1) + 1
why? The filed in the recordset, "Text1" is a text field in the table and
the variable lgNum is dimmed to Long. What am I misunderstanding about this
process.
Dim lgNum As Long
Dim rs As Recordset
Dim Db As Database
Set Db = CurrentDb()
Set rs = Db.OpenRecordset("qry1", dbOpenDynaset)
rs.MoveLast
lgNum = CLng(rs!Text1) + 1