For Each...Next Statement

G

gm

I have tblReminders with the following fields: ReminderID
(auto number), RemindMeOn(date), Reminder(text), IsItDone
(yes/no). On this table I base form frmReminders with the
corresponding fields. On the On Load event I use the
following code:

Sub Form_Load

For Each RemindMeOn In tblReminders

If RemindMeOn.Value < Date And IsItDone = 0 Then
RemindMeOn.Value = Date
End If

Next

in order to update the RemindMeOn date to the current date
if the IsItDone checkbox is not checked. Unfortunately it
doesn't work. Any clues what I'm doing wrong with the code?

Thanks in advance
 

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

Top