I have a membership database that shows an expiry date. I have a field that indicates "active" or "expired". I need to run a routine that will go through every record in a table and change the field (called status) if the date in another field (duespaid) is prior to the current date.
I can run this off a button, but I would much rather have it run automatically as soon as the database is opened up if possible.
I know it's mysql command but I can't get it to work
I tried something like this:
DoCmd.SetWarnings False
Dim SQL As String
SQL = "UPDATE tblmembers " & _
"SET tblmembers.status = 'Expired' where Date > tblmembers.Duespaid.Value"
DoCmd.RunSQL SQL
Paul Beddows
Consulting, Avaya/EAS implementation, Training
Vancouver, Canada
E-mail paul at natcoa.com
I can run this off a button, but I would much rather have it run automatically as soon as the database is opened up if possible.
I know it's mysql command but I can't get it to work
I tried something like this:
DoCmd.SetWarnings False
Dim SQL As String
SQL = "UPDATE tblmembers " & _
"SET tblmembers.status = 'Expired' where Date > tblmembers.Duespaid.Value"
DoCmd.RunSQL SQL
Paul Beddows
Consulting, Avaya/EAS implementation, Training
Vancouver, Canada
E-mail paul at natcoa.com