Maybe Simple...Maybe Not

gmatriix

Registered User.
Local time
Today, 15:40
Joined
Mar 19, 2007
Messages
365
Hello All,

All I am trying to do is have the Calendar control to display in a text box. So if I choose a date on the Calendar that date will display in a text box.

Is this simple?

Any Ideas?

Thanks
 
I hope this is any help:

I've did the following:

Code:
Private Sub txt_datum_Enter()

    Me.txt_datum.Value = txt_datum1.Value

End Sub

Where txt_datum is the text field and the txt_datum1 is the leading field, if you change txt_datum1 to calendar name it should be working.

I used the "Enter()" option as this works great while tabbing through multiple records.

Good luck
 
Why in the world would you want to change the textbox value anytime you happened to tab thru the control? You only want to assign the date to the textbox when you intentionally click on a date in the calendar! Proper usage would be either in the AfterUpdate or OnClick event of the calendar.

Code:
Private Sub CalendarName_AfterUpdate()
  Me.DateTextbox = Me.CalendarName.Value
End Sub
or
Code:
Private Sub CalendarName_Click()
  Me.DateTextbox = Me.CalendarName.Value
End Sub
And while Uncle Gizmo undoubtedly biased :D he's correct in that you're better off, because of compatibility issues, in using a non-ActiveX calendar such as his!
 
LOL

The database for this customer uses a lot of data, therefor the customer requested for a text field where he can enter the date (calendar field was thought of as to large).

Then he can tab through multiple records (200 to 300) and if necesary change the date for a couple of them. Because of the tabbing he can do this rather quick which is saving him a lot of time.

It isn't my solution but it works for him.
 
Uncle Gizmo, just had a look at your vids regarding your calendar, and I must say, I like it a lot. Simple and looks pretty easy to implement. If it is ok with you I will use yours going forward. Sweet!!
 
If it is ok with you I will use yours going forward. Sweet!

Feel free to use it, it's free to anyone that wants it. All I require is that the credits stay with the calendar so that I may pick up some work one day!

I also have another free offering that you may find useful at some stage, it's a tool in the form of a form for converting data in a spreadsheet like layout into a relational model more suitable to take advantage of MS Access features. There are four threads starting here: Excel in Access (Part 1) The first three are in text and pictures and the fourth thread Excel in Access (Part 4) is a set of videos each from three to six minutes, comprising a total time of about 21 minutes.

Not only is the tool useful for experienced programmers who want to quickly convert Excel type data into a more convenient structure to use in MS Access, the actual examples are very good for beginners who hopefully will see the basic difference between a spreadsheet and MS Access, you can tell people about "Normalization" until you are blue in the face, but actually seeing it done like this is the best way in my opinion.
 
Last edited:
Wow.....what response.....All these suggestions are GREAT!

However, All I did was make the control source the same as the text box. This way I could use it both ways...I can type a date in and find the date on the calendar or I can click on a date...added a refresh button and it give me the date of the selected calendar date....

The reason for this ....is I brought in a table as a subform....For each date I can type in a entry for that date....so on and so forth.....

These suggestions are GREAT!

Thanks again!
 
Uncle Gizmo,

Thank for the tutorials!!! Lord knows I need it!!!
 

Users who are viewing this thread

Back
Top Bottom