|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Calendars
I have added A calendar control to my forms...they are working fine....."Calendar Control 11.0"
BUT....I know here it comes... Everytime I open the calendar it seems to revert back to the date that I created it... I went into the Calendar Object Properties and tried to change the Value but it keeps going back... What I want is everytime I open the calendar I want to to default to the current data.. Any thoughts? THanks |
|
#2
|
|||
|
|||
|
Think I fixed it...
Added this line to set the calendar to the current date.... Calendar2.Value = Now() I think this makes sense... Code:
Private Sub Combo0_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Set varDate = Combo0
Calendar2.Value = Now()
Calendar2.Visible = True
Calendar2.SetFocus
If Not IsNull(Combo0) Then
Calendar2.Value = varDate.Value
Else
Calendar2.Value = Date
End If
End Sub
Last edited by Jaykappy : May 9th, 2008 at 12:11 PM. |
|
#3
|
|||
|
|||
|
This the other part
AT THE TOP Code:
Option Compare Database
' Variable for the NoticeDate Calendar
Dim varDate As ComboBox
ON THE CALENDAR CLICK EVENT Code:
Private Sub Calendar2_Click()
varDate.Value = Calendar2.Value
varDate.SetFocus
Calendar2.Visible = False
' CLear the variable so the next drop down can use it...
Set varDate = Nothing
End Sub
|
|
#4
|
||||
|
||||
|
Hi,..
Can i suggest you look at the custom calendar control i posted here, http://www.developerbarn.com/micros...ar-control.html |
|
#5
|
||||
|
||||
|
__________________
Did I help you? If so gimme rep by clicking on the at the top right corner of this post ![]() Madness does not always howl. Sometimes, it is the quiet voice at the end of the day saying, "Hey, is there room in your head for one more?" |
|
#6
|
|||
|
|||
|
Sure you can suggest....
I just got that from snid bits.... I am goin to look at yours...I am sure its better than the code I pasted...I have been trying to find a way to avoid the calendar controls myself.... Now I have one... THANKS ...have a great weekend....think I am going to go golf 9 holes before the rain hits.... |
|
#7
|
|||
|
|||
|
Sweet....
No problems with me using the code??? Ill give you props in my code.... |
|
#8
|
|||
|
|||
|
But a heck of a lot more code that I wrote...
But way cooler..... |
|
#9
|
|||
|
|||
|
Is there a way to copy that form from that database to my database?
moving all the code etc..... feeling lazy....but grateful |
|
#10
|
|||
|
|||
|
No Kidding ...you can drag and drop??????
wow |
|
#11
|
||||
|
||||
|
yeah, it's easy...... import the module and form2..... form1 shows how to call the module
![]() |
|
#12
|
|||
|
|||
|
Yea just opened both databases...dragged the form and module into my database.
Had to remove the control on the textbox cause not hitting a tableat this point...all set... Looks great....thanks... |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Calendars |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|