Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Calendar Control not working when in a Tab Control

Posted on 2004-08-22
Medium Priority
Last Modified: 2012-05-05
For some reason, my Calendar control doesn't work when contained within a tab control. I have date fields within Tab Pages that when clicked, should call a Calendar control to select a date and enter it in the text field. However, this doesn't work. Can one of you Experts please help? Many kind thanks in advanced!
Question by:John Account
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2

Expert Comment

ID: 11865373
Please explain a little more if you could... is the calendar control on a second form?  If so, is the problem that the form won't open?  If the calendar control is on the main form, is it made visible?  If so, is it behind the tab control and therefore, while visible, still not viewable?


Author Comment

by:John Account
ID: 11865460
Okay, Mike, thanks. Here's more explanation: There are 5 Calendar controls on the same form: 3 are contained within a page of its Tab Control, and the other 2 are on the form, outside the tab control. The two that are not in the tab control work like they're supposed to, but not the three within the tab control. Moreover, before adding the tab control to the form, all 3 Calendar controls worked just fine. I've increased the points to 350. Many kind thanks in advanced. Below is the source code:

Private Sub Calendar1_Click()
txtUserChg = SignedInUser
txtDateP2PEntered = Now()
txtPTPDATE = Calendar1.Value
Calendar1.Visible = False
End Sub

Private Sub Calendar2_Click()
txtDATE = Calendar2.Value
Calendar2.Visible = False
End Sub

Private Sub Calendar3_Click()
txtDaterec1 = Calendar3.Value
Calendar3.Visible = False
End Sub

Private Sub Calendar4_Click()
txtDATEVER = Calendar4.Value
Calendar4.Visible = False
End Sub

Private Sub Calendar5_Click()
  Me.txtSentCD = Calendar5.Value & " - " & Format(Now(), "hh:mm:ss")
  Me.Calendar5.Visible = False
End Sub

Author Comment

by:John Account
ID: 11865478
Also, it's not behind the tab control, nor any other controls, therein, so that's not an issue. It is invisible, initially, by made visible once clicked, as the code, in previous submission, illustrates.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 27

Accepted Solution

jjafferr earned 1400 total points
ID: 11865699
Hi Jhon,

Why don't you try to put the full path to the Tab (Tab Name) when calling the calendar control, for example:

txtPTPDATE = Calendar1.Value

should be

txtPTPDATE = Forms![YourMainForm].Form![Page41].Calendar1.Value

Where Page41 is the Tab Name


Author Comment

by:John Account
ID: 11865785
I get the following error, when I try that, Jaffer:
Run-time error '438': Object doesn't support this property or method.
txtPTPDATE = Forms![Collections Admin].Form![PgSales-Verified].Calendar1.Value

Author Comment

by:John Account
ID: 11865837
Hey, Jaffer--I'll be damned...apparently it's suddenly working. I don't know what was wrong, maybe a typo in my code or something, but all is well now. Thanks!
LVL 27

Expert Comment

ID: 11865935
I guess its my lucky day with you, answering 3 questions of yours.

thanks for the points and the grade


Author Comment

by:John Account
ID: 11866306
You're most welcome, Jaffer--Thank you! And, hopefully, you will answer more questions from me in the future...as I have many questions and you, apparently, have many answers. You know Access very well. I haven't touched it in about a year--and, even then, didn't know the answers to any of these questions you've been so kind enough to answer for me.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question