?
Solved

Continuation of Q.10296106 - XCalendar control

Posted on 2000-02-21
6
Medium Priority
?
252 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
[X]
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
6 Comments
 
LVL 10

Accepted Solution

by:
paasky earned 200 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

771 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