From: JOSELUIS via AccessMonster.com on 6 May 2010 18:11 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
|
Pages: 1 Prev: Dirk Goldgar help please!!! Next: Cascading Combo Box - help needed please. |