Solved

Continuation of Q.10296106 - XCalendar control

Posted on 2000-02-21
6
241 Views
Last Modified: 2012-05-04
I have an active X calendar control that I use to lookup data from a table. I click on a date and it returns data from table using a query into a subform. I have been asked if it would be possible to click on more than one day at a time on the calendar control to get data. Want to be able to click multiple days, say a week at a time and have it displayed in my subform.

Passky helped me out with the calendar control to start with. Maybe your still around?

Bill
0
Comment
Question by:bneuman
6 Comments
 
LVL 10

Accepted Solution

by:
paasky earned 50 total points
ID: 2542995
Hello bneuman,

I'm afraid that's not possible to select multiple dates, because Calendar control's Value property is not an array so it can have only one value (date) at the time.

But you could do a query which have WHERE clause like this:

WHERE format([DateField],"wwyyyy") = Format(Forms![form1]![XCalendar],"wwyyyy")

ww = week
yyyy = year

It would show all the dates from the selected week.

Regards,
Paasky
0
 
LVL 10

Expert Comment

by:brewdog
ID: 2543007
I don't remember which question it was, but I know sometime in the past month someone had this question . . . and the answer was that someone has created a calendar control that lets you do this. I'd do a search to see if you can find the old question.

Otherwise, of course, paasky's idea could work, or having the user click the calendar control several times and storing the values in an array yourself. That's a little work, though. :o)
0
 
LVL 7

Expert Comment

by:JimMorgan
ID: 2543471
I created a popup form with a calendar control incorporated which allows you to select = data, < date, > date, <= date, >= date, or combinations of > date and <= date.  It has two text boxes which are used to store the dates - lower / upper.  Below the calendar are two click frames.  One for the = & > combinations and the other for the < combinations.  You select a date and click what type of date this is.  It goes into the appropriate box.  Select another date and so the same.  There is logic that looks at the date and swap them is they are in the wrong sequence.  Clicking done passes the date(s) back as a string.  The form works off the field to be used in the SQL.  The field to search is stored in the Tag.

It wouldn't be too hard to add a week, month, or year.  When you click that date type and the date, the appropriate week, month, or year would be returned.

Is that something like you are looking for?

Jim
0
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!

 

Author Comment

by:bneuman
ID: 2552812
passky,

Sorry for not getting back to you sooner. Have been working long days and haven't had a chance to get back on. I'll give you the points now and look at it over the weekend. Thanks brewdog and Jim Morgan for you input also. Jim I may get back to you on your calendar control.

Bill
0
 
LVL 10

Expert Comment

by:paasky
ID: 2553302
bneuman, glad I could assist you.

I have also been very busy with my projects recent days and have a very little time to watch what's going on here in EE... :-(

JimMorgan's suggestion sounds interesting...

Regards,
paasky
0
 
LVL 7

Expert Comment

by:JimMorgan
ID: 2555577
Bill,

I'm not always hanging around EE so I might not see a question but if you make a comment to this one, I'll get the email notification.  I do check my email regularly.

Jim
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

679 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