grinder332518
Registered User.
- Local time
- Today, 16:17
- Joined
- Jun 22, 2009
- Messages
- 28
My table is called "table A".
There is a date field in this table called "1st Date Issued".
My Form accesses this table, and I would like to write an expression which looks at all the entries in my table, and if "1st Date Issued" is more than 14 days ago, then to bring up a MsgBox.
I thought I would use an 'On Enter' event procedure, like
If [table A].[1st Date Issued] < (Date - 14) Then
Call MsgBox("OnEnter :- Date is before 14 days ago")
Cancel = True
Exit Sub
End If
But this gives me syntax errors.
I am new to Access, and all the training I have done has tables and fields without spaces in them.
Can someone give me the correct syntax please ?
And is the 'On Enter' event procedure the best way to handle this ?
Many thanks
There is a date field in this table called "1st Date Issued".
My Form accesses this table, and I would like to write an expression which looks at all the entries in my table, and if "1st Date Issued" is more than 14 days ago, then to bring up a MsgBox.
I thought I would use an 'On Enter' event procedure, like
If [table A].[1st Date Issued] < (Date - 14) Then
Call MsgBox("OnEnter :- Date is before 14 days ago")
Cancel = True
Exit Sub
End If
But this gives me syntax errors.
I am new to Access, and all the training I have done has tables and fields without spaces in them.
Can someone give me the correct syntax please ?
And is the 'On Enter' event procedure the best way to handle this ?
Many thanks