Microsoft
Software
Hardware
Network
Question : Validate Month & Year Field on Form
On a form, I have a PO Date formatted MM/DD/YYYY; on the same record one must choose a date from a combo box and that date needs to be either in the same MONTH/YEAR as the PO date field or later. How do I write a Validation Rule for this? Thanking you in advance!
Answer : Validate Month & Year Field on Form
I would put something like this in the form's BeforeUpdate event...
If Me!ThatComboBox < DateSerial(Year(Me!PO_Date
), Month(Me!PO_Date), 1) Then
MsgBox "Invalid date", vbCritical, "No soup for you!"
Me.ThatComboBox.SetFocus
Cancel = True
End If
Random Solutions
Installation of MDE and MDB in Vista
error with web site when it was moved from server 2003 to 2008
insert into in other access database with password
Setting LinkChildField and LinkMasterField Property Issue
How to custom NDR message in Exchange 2007 and disable NDR for internet email sender
Java Script - Toggle a checkbox by clicking on an image
OpenRecordSet querydef with parameter problem Access 97
CHARINDEX whole word match
Remove hiberfil.sys windows 2003 SBS sp1
I need my DateTimePicket to only allow dates for this year (vb.net)