By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,638 Members | 2,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,638 IT Pros & Developers. It's quick & easy.

date and time field conflict

P: 1
i have a datereq field and dateauth field in the same table. i want to allow the user to put in a dateauth - but require it to be greater or after the datereq. the dateauth must remain a null value so that the user has the option of leaving it blank.

please help me with the validation rule
Sep 5 '06 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
Put the validation in the AfterUpdate event of the dateauth textbox control.

Expand|Select|Wrap|Line Numbers
  1. Private Sub dateauth_AfterUpdate()
  2. If Me.dateauth <= datereq Then
  3. Msgbox "Date must be after...", vbOkOnly, vbWarning
  4. Me.dateauth = Null
  5. Me.dateauth.SetFocus
  6. End If
  7. End Sub
  8.  
i have a datereq field and dateauth field in the same table. i want to allow the user to put in a dateauth - but require it to be greater or after the datereq. the dateauth must remain a null value so that the user has the option of leaving it blank.

please help me with the validation rule
Sep 5 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.