Groundrush
Registered User.
- Local time
- Today, 03:43
- Joined
- Apr 14, 2002
- Messages
- 1,376
Hi all,
I'm trying to prevent records being entered outside a time period & I'm struggling to work out the best method of doing so
I've been trying
This does seem to work but I need to be more flixable & allow 2 weeks either side of the two dates but not sure on the correct way of coding it.
I need something like
Can someone please show me the correct way?
Thanks
I'm trying to prevent records being entered outside a time period & I'm struggling to work out the best method of doing so
I've been trying
Code:
If Me.txtStartDate <= #3/13/2010# Or Me.txtStartDate >= #3/12/2011# Then
MsgBox "This date may be incorrect please check your records & try again"
Me.txtStartDate = ""
Me.txtStartedHidden = ""
End if
This does seem to work but I need to be more flixable & allow 2 weeks either side of the two dates but not sure on the correct way of coding it.
I need something like
Code:
If me.txtStartDate <= now() -14 or Me.txtStartDate >=Now() +14 then
MsgBox "This date may be incorrect please check your records & try again"
Me.txtStartDate = ""
Me.txtStartedHidden = ""
End if
Can someone please show me the correct way?
Thanks