A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help with VB code for Calendar



 
 
Thread Tools Display Modes
  #1  
Old February 25th, 2006, 05:31 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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  
Old February 25th, 2006, 08:45 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.