Valery
Registered User.
- Local time
- Today, 12:31
- Joined
- Jun 22, 2013
- Messages
- 363
Hi all,
Someone was generous enough to provide me with this coding/module which works great! However, the database structure has changed somewhat and I need something added to the function and do not have a clue how to do this.
Need to add NOT to change the MailList field (as per the function) IF the tblTenancy table [EndDate] field is not null.
or, if it is easier, the reverse:
Make the change to the MailList field (as per the Function) ONLY if the tblTenancy table [EndDate] field is null.
Thank you!
Someone was generous enough to provide me with this coding/module which works great! However, the database structure has changed somewhat and I need something added to the function and do not have a clue how to do this.
Code:
Public Function fnUpdateMailListField()
Dim db As DAO.Database
Set db = CurrentDb
db.Execute "Update tblTenants Set [MailList] = True Where [MailList] = False And " & _
"Val(fnAge([DOB]) & '') > 16;"
Set db = Nothing
End Function
Need to add NOT to change the MailList field (as per the function) IF the tblTenancy table [EndDate] field is not null.
or, if it is easier, the reverse:
Make the change to the MailList field (as per the Function) ONLY if the tblTenancy table [EndDate] field is null.
Thank you!