Limiting Date

klee

Registered User.
Local time
Today, 05:41
Joined
Nov 23, 2001
Messages
22
I have problems with the dates in my form. I have a RequestDate field and DateNeeded field. Currently, my requestdate can key in a date that is > than the dateneeded. I think I will be able to control the field through the VB code. I wonder anyone would be able to help me up with this, show me how to write a code that can restrict the date. I have no VB knowledge at all.

Thanks in advance
 
Assuming that the DateNeeded field is filled in prior to the RequestDate then code similar to this in the Before Update event of the RequestDate should work:

If Me![RequestDate] > Me![DateNeeded] Then
MsgBox "The Request date is later than the Date Needed."
Me.RequestDate.Undo
Cancel = True
End If
 
Please just post your questions in one forum.

Asked and answered:
http://www.access-programmers.co.uk/ubb/Forum4/HTML/004981.html

If your not satisfied with that answer, say so. Don't post another thread and be rude to the people who were trying to help you.

[This message has been edited by jwindon (edited 11-29-2001).]
 

Users who are viewing this thread

Back
Top Bottom