Solved

Continuation of Q.10296106 - XCalendar control

Posted on 2000-02-21
6
206 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:bneuman
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now