473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access Calendar Control 11.0 12/1899 Date Problem

Hello all, and thank you in advance for your assistance.

I'm pretty new to access and I'm trying to teach myself some VBA by
using various bits of code I find here and there mixed with my own.
I've seen mentions of this issue in other forums, but haven't found an
ansewer (at least one I understand lol) in other postings.

I have a text box that users need to input a short date into. I tried
using a Access's built in calendar control 11.0 so that users can just
click on the date. The calender is hidden until someone clicks a
command button, then the calendar opens, someone selects the date, the
calendar closes. The problem is that when you first attempt to enter
the date, it shows the date as 12/30/1899. I'll post my code below,
and if anyone sees what I've done wrong or am missing, would you please
explain it in a way so that my 5yr old can understand it so he can
explain it to me? LoL btw 1 calendar is being used to fill in 2
seperate text boxes.

Again, thanks in advance for your help

Option Compare Database
Dim cboOriginator As TextBox

Private Sub Calendar3_Click()

cboOriginator.Value = Calendar3.Value
issue_type.SetFocus
Calendar3.Visible = False
Set cboOriginator = Nothing

End Sub

Private Sub Command25_Click()

Set cboOriginator = issue_date
Calendar3.Visible = True
Calendar3.SetFocus
If Not IsNull(cboorigionator) Then
Calendar3.Value = cboOriginator.Value
Else
Calendar3.Value = Now()
End If

End Sub

Private Sub Command29_Click()

Set cboOriginator = date_due
Calendar3.Visible = True
Calendar3.SetFocus
If Not IsNull(cboOriginator) Then
Calendar3.Value = cboOriginator.Value
Else
Calendar3.Value = Now()
End If

End Sub

Aug 18 '06 #1
1 9651
There are several problems with these ActiveX controls.

Here's a simple little Access form that you can use instead to enter any
date, without the need for any extra controls:
Popup calendar
at:
http://allenbrowne.com/ser-51.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"afr0ninja" <mo**************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hello all, and thank you in advance for your assistance.

I'm pretty new to access and I'm trying to teach myself some VBA by
using various bits of code I find here and there mixed with my own.
I've seen mentions of this issue in other forums, but haven't found an
ansewer (at least one I understand lol) in other postings.

I have a text box that users need to input a short date into. I tried
using a Access's built in calendar control 11.0 so that users can just
click on the date. The calender is hidden until someone clicks a
command button, then the calendar opens, someone selects the date, the
calendar closes. The problem is that when you first attempt to enter
the date, it shows the date as 12/30/1899. I'll post my code below,
and if anyone sees what I've done wrong or am missing, would you please
explain it in a way so that my 5yr old can understand it so he can
explain it to me? LoL btw 1 calendar is being used to fill in 2
seperate text boxes.

Again, thanks in advance for your help

Option Compare Database
Dim cboOriginator As TextBox

Private Sub Calendar3_Click()

cboOriginator.Value = Calendar3.Value
issue_type.SetFocus
Calendar3.Visible = False
Set cboOriginator = Nothing
End Sub

Private Sub Command25_Click()

Set cboOriginator = issue_date
Calendar3.Visible = True
Calendar3.SetFocus
If Not IsNull(cboorigionator) Then
Calendar3.Value = cboOriginator.Value
Else
Calendar3.Value = Now()
End If
End Sub

Private Sub Command29_Click()

Set cboOriginator = date_due
Calendar3.Visible = True
Calendar3.SetFocus
If Not IsNull(cboOriginator) Then
Calendar3.Value = cboOriginator.Value
Else
Calendar3.Value = Now()
End If
End Sub

Aug 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: bebelino | last post by:
I'm working on a calendar-program. I wonder what the best approach would be for storing the begin- and end date/time for a particular calendaritem. Right now I have two fields: Startdate and...
5
by: Larry R Harrison Jr | last post by:
I use the Lebans calendar control and love it; the only thing is that it commonly starts out at the year 1899 rather than the current year. Is there a way to specifically tell it to start at the...
1
by: Eric Girouard | last post by:
Hi A web design client of mine has been developing an Access database with me for the last few months. His intention was to clean up a very messy paper-based workflow consisting of many location...
0
by: maxrawson | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
2
by: Caesar Augustus | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
6
by: Mike9900 | last post by:
Hello, I want to view the calendar in another culture, for example let it show in Arabic. I use this code in the Main, but the calendar is still in the same culture: CultureInfo sa = new...
3
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
8
by: saladinator | last post by:
I have created an Excel spreadsheet that has a lot of data. What I want to do is import the spreedsheet to Access and create a form so that I can print each row per page in a proffessional manner....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.