Solved

Continuation of Q.10296106 - XCalendar control

Posted on 2000-02-21
6
228 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

777 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