Code error

K

Kay

Hi
I have created a reminder for my project using a table with the fields,
alarm id, alarm time and message. Iv used the following code to check
each record to see if the alarm time matches the current time. I am
getting an error with the line
"Set rs = Me.RecordsetClone". The error is "Type Mismatch"

Dim rs As Recordset

Set rs = Me.RecordsetClone
With rs
Do Until .EOF
.MoveFirst
If Me.[AlarmDate] = Date And Me.[AlarmTime] <= Time() And
Me.[Reset] = False Then
MsgBox ("A Job is Due") & vbCrLf & _
("ALARM ID = ") & AlarmID & vbCrLf & ("ALARM MESSAGE = ") &
AlarmMessage & vbCrLf & ("Please tick the reset box on the alarm form
to reset the alarm")
End If
.MoveNext
Loop
End With
Set rs = Nothing

Has anyone any idea why this could be, your help is very much
appreciated.
 
G

Guest

Kay,

I have not looked at the rest of your code, but only the lines that you say
you are having a problem with. The question here is were are you trying to
use the recordsetclone? Is this being done in a form with an attached record
source?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top