Hi
I have this code which works perfectly if I manually type a number in
e.g. if VarReg = 2 and i type this instead of varReg it works
ELSE i get the error... have looked at similar errors and tried a few things BUT STILL GIVING ME TROUBLE....
Could someone PLEASE please help...
ALSO, in the msgbox,
Instead of just saying you have mail, is there a way to show how many records were counted???
Thx
Darin
I have this code which works perfectly if I manually type a number in
e.g. if VarReg = 2 and i type this instead of varReg it works
ELSE i get the error... have looked at similar errors and tried a few things BUT STILL GIVING ME TROUBLE....
Code:
Dim VarReg as Integer
VarReg = [Forms]![frmPassword]![tReg]
Set rst2 = dbs.OpenRecordset("SELECT tblDiary.DiaryID, tblDiary.RegNo, tblDiary.ReadDiary, tblDiary.MsgTo FROM tblDiary WHERE (((tblDiary.RegNo) = [Forms]![frmPassword]![tReg]) And ((tblDiary.ReadDiary) = 0)) ORDER BY tblDiary.MsgTo")
If rst2.RecordCount > 0 Then
MsgBox "you have mail"
End If
Could someone PLEASE please help...
ALSO, in the msgbox,
Instead of just saying you have mail, is there a way to show how many records were counted???
Thx
Darin