Solved

Continuation of Q.10296106 - XCalendar control

Posted on 2000-02-21
6
219 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
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 different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

932 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

12 Experts available now in Live!

Get 1:1 Help Now