A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using an activex calendar to enter parameter values



 
 
Thread Tools Display Modes
  #1  
Old July 2nd, 2009, 05:07 AM posted to microsoft.public.access
Jim L.[_2_]
external usenet poster
 
Posts: 56
Default Using an activex calendar to enter parameter values

After all of the posts I've read, I still don't understand how to enter
parameter values to run a report by using a calendar. I have several reports
based on queries that require a start & end date, and I have downloaded a
calendar to use, but that's as far as I can get. Can anyone explain the
process to a beginner? Also, some reports display information that only
happens one or two random days each month. Is there a way for the user to
enter only the month they want to see (maybe with the calendar?) instead of a
start & end date as month/day/year?
Thanks for any help in advance.
  #2  
Old July 2nd, 2009, 01:42 PM posted to microsoft.public.access
Mark Andrews[_2_]
external usenet poster
 
Posts: 600
Default Using an activex calendar to enter parameter values

First I would say that most Access developers would not use an ActiveX
control calendar and instead
give the user an option to enter either two dates (start and end) or pick a
month from a combobox. Have two columns for the month combobox bound column
is a hidden date (example: 7/1/2009 for July 2009) and one which displays
"July 2009".

On either selection you just need to construct the where clause
appropriately. For the two dates use between date1 and date2, and
month(thedatefield) = Month(yourcombobox) for the month selection. You can
do this via code and call the report with a where clause or refer to the
control in the query that drives the report, or construct the query that
drives the report "on the fly" and then call the report. The where clause
sounding the most reasonable for this situation.

If you really want to use the activeX control you need to grab the start and
end date of the selection and apply the same techniques. User presses a
button to run the report and the where clause is constructed via code and
the report is called via OpenReport and passed in a where clause.

Codejock software has a nice date selector control if you go the activeX
route.

I did a quick search and this post might help a little:
http://www.access-programmers.co.uk/...ad.php?t=26072


HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com

"Jim L." wrote in message
...
After all of the posts I've read, I still don't understand how to enter
parameter values to run a report by using a calendar. I have several
reports
based on queries that require a start & end date, and I have downloaded a
calendar to use, but that's as far as I can get. Can anyone explain the
process to a beginner? Also, some reports display information that only
happens one or two random days each month. Is there a way for the user to
enter only the month they want to see (maybe with the calendar?) instead
of a
start & end date as month/day/year?
Thanks for any help in advance.



  #3  
Old July 8th, 2009, 06:39 AM posted to microsoft.public.access
Jim L.[_2_]
external usenet poster
 
Posts: 56
Default Using an activex calendar to enter parameter values

Mark,
My mistake!! What I have downloaded is not an activeX calendar, but Allen
Browne's calendar. I've got most of it working, although maybe a bit
unorthodox, but writing code is beyond anything I know how to do.

What I have done is to create a form with 2 unbound text boxes ([Start] &
[End]), and placed the calendar command buttons next to them. I have also
added an "OK" command button that runs a macro that opens the report, and
closes the calendar form. In the Query that the report is based on, the Date
criteria reads"Between ([Forms]![MonthlyGLDate]![Start]) And
([Forms]![MonthlyGLDate]![End])"
I tried setting the criteria as just "[Forms]![MonthlyGLDate]![Start] And
[End]", but that was returning another parameter window asking me to enter
"[Forms]![MonthlyGLDate]![Start] And [End]".
As for allowing the user to select just a month, I like the idea of a combo
box, but I'm afraid you lost me on setting up the form, and what to put in
the Date criteria of the query.
Thanks again for your help.

"Mark Andrews" wrote:

First I would say that most Access developers would not use an ActiveX
control calendar and instead
give the user an option to enter either two dates (start and end) or pick a
month from a combobox. Have two columns for the month combobox bound column
is a hidden date (example: 7/1/2009 for July 2009) and one which displays
"July 2009".

On either selection you just need to construct the where clause
appropriately. For the two dates use between date1 and date2, and
month(thedatefield) = Month(yourcombobox) for the month selection. You can
do this via code and call the report with a where clause or refer to the
control in the query that drives the report, or construct the query that
drives the report "on the fly" and then call the report. The where clause
sounding the most reasonable for this situation.

If you really want to use the activeX control you need to grab the start and
end date of the selection and apply the same techniques. User presses a
button to run the report and the where clause is constructed via code and
the report is called via OpenReport and passed in a where clause.

Codejock software has a nice date selector control if you go the activeX
route.

I did a quick search and this post might help a little:
http://www.access-programmers.co.uk/...ad.php?t=26072


HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com

"Jim L." wrote in message
...
After all of the posts I've read, I still don't understand how to enter
parameter values to run a report by using a calendar. I have several
reports
based on queries that require a start & end date, and I have downloaded a
calendar to use, but that's as far as I can get. Can anyone explain the
process to a beginner? Also, some reports display information that only
happens one or two random days each month. Is there a way for the user to
enter only the month they want to see (maybe with the calendar?) instead
of a
start & end date as month/day/year?
Thanks for any help in advance.




  #4  
Old July 8th, 2009, 08:08 AM posted to microsoft.public.access
Jim L.[_2_]
external usenet poster
 
Posts: 56
Default Using an activex calendar to enter parameter values

One more thing...
I just copied the calendar form to use again for another parameter set. I
renamed, adjusted the properties to the different query, and when I open the
form in form view, it is completely empty. All of the controls show up in
design view, and of course all are set to visible always. What am I missing?

"Mark Andrews" wrote:

First I would say that most Access developers would not use an ActiveX
control calendar and instead
give the user an option to enter either two dates (start and end) or pick a
month from a combobox. Have two columns for the month combobox bound column
is a hidden date (example: 7/1/2009 for July 2009) and one which displays
"July 2009".

On either selection you just need to construct the where clause
appropriately. For the two dates use between date1 and date2, and
month(thedatefield) = Month(yourcombobox) for the month selection. You can
do this via code and call the report with a where clause or refer to the
control in the query that drives the report, or construct the query that
drives the report "on the fly" and then call the report. The where clause
sounding the most reasonable for this situation.

If you really want to use the activeX control you need to grab the start and
end date of the selection and apply the same techniques. User presses a
button to run the report and the where clause is constructed via code and
the report is called via OpenReport and passed in a where clause.

Codejock software has a nice date selector control if you go the activeX
route.

I did a quick search and this post might help a little:
http://www.access-programmers.co.uk/...ad.php?t=26072


HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com

"Jim L." wrote in message
...
After all of the posts I've read, I still don't understand how to enter
parameter values to run a report by using a calendar. I have several
reports
based on queries that require a start & end date, and I have downloaded a
calendar to use, but that's as far as I can get. Can anyone explain the
process to a beginner? Also, some reports display information that only
happens one or two random days each month. Is there a way for the user to
enter only the month they want to see (maybe with the calendar?) instead
of a
start & end date as month/day/year?
Thanks for any help in advance.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.