If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
VALIDATION RULE
Hello everybody! I´m trying to create a BirthDate textbox in my frmContacts
(Jeff Conrad & Viescas) with the following code: Private Sub BirthDate_BeforeUpdate(Cancel As Integer) ' Make sure date not in the future If Me.BirthDate Date - (365 * 18) Then MsgBox "Contact must be older than 18.", vbCritical, gstrAppTitle Cancel = True End If End Sub But only woks if I select to Show the data picker and I pick the date from it. I also tried this one: Validation rule:= (Date()-(365*18)) Validation Text:Contact must be older than 18 But it works neither the Calendar Activex Control frmCalendarOCX nor frmCalendar however it works with the data picker.Providing I use in most of my data fields frmCalendar because it is easier for me to select a date than from the data picker, can I solve this problem easily without using the data picker? Maybe because I´m using the following date format: dd/mm/yyyy and the spanish version isn´t working properly. -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|