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
|
|||
|
|||
Help with VB code for Calendar
I have inputted the code for a calendar however it doesn't work when I use
this validation '=DateAdd("d",7,Date()) And =DateAdd("m",2,Date())' The code I used was Option Compare Database Private Sub Calendar2_Click() Event_Date.Value = Calendar2.Value*** Event_Date.SetFocus Calendar2.Visible = False End Sub Private Sub Event_Date_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Calendar2.Visible = True Calendar2.SetFocus If Not IsNull(Event_Date) Then Calendar2.Value = Event_Date.Value Else Calendar2.Value = Date End If End Sub If anyone could help me out with corecting this code so that the calendar will work with the validation I would be very grateful The line that the debugger higlights is the starred line above*** |
#2
|
|||
|
|||
Help with VB code for Calendar
maybe Event_Date.Value = me!Calendar2.Value
-- -Larry- -- "Stibbz" wrote in message news I have inputted the code for a calendar however it doesn't work when I use this validation '=DateAdd("d",7,Date()) And =DateAdd("m",2,Date())' The code I used was Option Compare Database Private Sub Calendar2_Click() Event_Date.Value = Calendar2.Value*** Event_Date.SetFocus Calendar2.Visible = False End Sub Private Sub Event_Date_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Calendar2.Visible = True Calendar2.SetFocus If Not IsNull(Event_Date) Then Calendar2.Value = Event_Date.Value Else Calendar2.Value = Date End If End Sub If anyone could help me out with corecting this code so that the calendar will work with the validation I would be very grateful The line that the debugger higlights is the starred line above*** |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
vb help, convert from formula to vb code.. | Michael A | General Discussion | 1 | January 7th, 2006 11:30 AM |
VB code to perform custom query of MS access table and display alert | [email protected] | Running & Setting Up Queries | 1 | December 26th, 2005 08:49 PM |
VB Code and Excel | SMBR | Worksheet Functions | 2 | October 24th, 2005 10:07 PM |
Find the cell value in excel by using vb code | Michael | General Discussion | 5 | June 14th, 2005 01:24 PM |
Make Change Case in Excel a format rather than formula | Kevin | Worksheet Functions | 1 | March 18th, 2005 08:53 PM |