Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / ActiveX Controls / July 2007

Tip: Looking for answers? Try searching our database.

ActiveX Calendar & Subforms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
That Crazy Hockey Dood - 24 Jul 2007 16:20 GMT
I have been on a wild search over the last few months to find a way to use an
ActiveX based calendar on a form which when the date is updated the subform
displays the results of the data that matches the selected date.

For Ex.:  I select July 23rd on the calendar.  When the date is selected, a
query runs against the database table to provide matches for the selected
date.  All of the matches are displayed in the subform without any further
input from the user.

Any help is appreciated.  The original application that I am attempting to
replicate was created in FoxPro.  That application uses a simple scroll
button to change the date opposed to a calendar of sorts.  I am left to
assume that it has a table that has all of the dates inside of it but I am
not able to load it since I don't have a copy of FoxPro.
Signature

Baliff.  Whack him in the pee-pee!

Alex Dybenko - 25 Jul 2007 05:39 GMT
Hi,
use calendar control's Click event to filter subform, for example:

me.MySubform.form.filter="MyDate=#" &
format(me.Calendar1.value,"mm\/dd\/yyyy") & "#"

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

>I have been on a wild search over the last few months to find a way to use
>an
[quoted text clipped - 13 lines]
> assume that it has a table that has all of the dates inside of it but I am
> not able to load it since I don't have a copy of FoxPro.
That Crazy Hockey Dood - 25 Jul 2007 14:36 GMT
Alex..

Thank you for the information.  Let me start out by saying that I am pretty
novice when it comes to building forms.  I am self taught on form building.  
Also, I should advise that I am using Access 2003.  I believe that I found
where you were advising in the post below but I want to make sure.  I go into
the properties of the calendar & then the events tab.  However, I did not
have one that was "click".

Also, the code provided would go in as VB, correct?

Thank you for the point in the right direction on this.  All help is greatly
appreciated.

Jim
Signature

"Baliff.  Whack him in the pee-pee!"
"Evil men?  Yes.  They rape the land and pillage the women!"
"How come his is so much bigger then yours?"
"You got knocked the f*@k out!"

> Hi,
> use calendar control's Click event to filter subform, for example:
[quoted text clipped - 19 lines]
> > assume that it has a table that has all of the dates inside of it but I am
> > not able to load it since I don't have a copy of FoxPro.
That Crazy Hockey Dood - 25 Jul 2007 14:56 GMT
Alex..

Thank you for the information.  I should advise that I am novice when it
comes to Access.  I have not had a lot of experience building forms and this
is my first attempt to build one.

I have looked at the information provided.  I am using Access 2003 and did
not find a "click" event but I am sure I was in the right place.  I put the
code you provided into VB but it failed to compile.  It does not like the '&'
nor did it like the "#" at the end of the code.

Thank you for the direction.

Jim
Signature

"Baliff.  Whack him in the pee-pee!"
"Evil men?  Yes.  They rape the land and pillage the women!"
"How come his is so much bigger then yours?"
"You got knocked the f*@k out!"

> Hi,
> use calendar control's Click event to filter subform, for example:
[quoted text clipped - 19 lines]
> > assume that it has a table that has all of the dates inside of it but I am
> > not able to load it since I don't have a copy of FoxPro.
That Crazy Hockey Dood - 25 Jul 2007 16:08 GMT
Alex..

Thank you for the response.  I am a novice in Access.  I typically do more
query building then anything else.  However, I need to create this form to
replace the one in FoxPro.

I am using Access 2003.  I have looked under the Calender Properties >
Events Tab.  I do not show a "click" but figure 'On Updated' will work.  I
have attempted to use the VB code provided and adjust the two calls that I
needed to and it fails on compile.  It does not like the '&' or the "#" at
the very end of the data.

Pointing me in the right direction is very much appreciated at this point.

Thanks,
Jim
Signature

"Baliff.  Whack him in the pee-pee!"
"How come his is so much bigger then yours?"
"I am not even suppose to be here today!"

> Hi,
> use calendar control's Click event to filter subform, for example:
[quoted text clipped - 19 lines]
> > assume that it has a table that has all of the dates inside of it but I am
> > not able to load it since I don't have a copy of FoxPro.
Alex Dybenko - 25 Jul 2007 19:17 GMT
Hi Jim,
you do not see click event in properties, just open form's class module, in
left combo select calendar control name, in right - click event - this will
insert event proc declaration

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

> Alex..
>
[quoted text clipped - 42 lines]
>> > am
>> > not able to load it since I don't have a copy of FoxPro.
That Crazy Hockey Dood - 25 Jul 2007 19:32 GMT
Alex..

I've got to be missing something here.  If I look at the properties of the
Form which has the ActiveX Calendar & Subform inside of it then I find an
event called 'Click'.

If you tell me where I should be then I am sure this would be easy to find.  
Today I couldn't find my way out of a wet paperbag if I tried.

Thanks for the patience.

Jim
Signature

"Baliff.  Whack him in the pee-pee!"
"How come his is so much bigger then yours?"
"I am not even suppose to be here today!"

> Hi Jim,
> you do not see click event in properties, just open form's class module, in
[quoted text clipped - 47 lines]
> >> > am
> >> > not able to load it since I don't have a copy of FoxPro.
That Crazy Hockey Dood - 25 Jul 2007 19:56 GMT
Let me try this again...   I am not using calendar control 11.0 but I am
using Microsoft Date and Time Picker 6.0 (SP4).  That may be some of the
confusion.  I do not care for the huge display on the calendar control.  I
like the dropdown feature on the other one.

Sorry about the confusion.

Signature

"Baliff.  Whack him in the pee-pee!"
"How come his is so much bigger then yours?"
"I am not even suppose to be here today!"

> Alex..
>
[quoted text clipped - 60 lines]
> > >> > am
> > >> > not able to load it since I don't have a copy of FoxPro.
Alex Dybenko - 26 Jul 2007 06:12 GMT
Hi,
you need to open form in design, and the open its module, then in
left combo select calendar control name, in right - click event

you can also look at sample I made for calendar control here:
http://www.pointltd.com/Downloads/Details.asp?dlID=32

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

> Alex..
>
[quoted text clipped - 74 lines]
>> >> > am
>> >> > not able to load it since I don't have a copy of FoxPro.
That Crazy Hockey Dood - 26 Jul 2007 14:14 GMT
Alex..

I finally caught what you meant.  In VB at the top I should have it on
Calendar and Click.  Got it...  *whew*

Here is what I had to change the code to just so it would compile:

Private Sub Calendar_Click()

Me.Exception_Tbl_subform.Form.Filter = "MyDate=#"
Format(Me.Calendar.Value, "mm\/dd\/yyyy") = "#"

End Sub

It does not like the use of the "&" in the code.  Once I go back to the
form, I get the same response as before.  I click the date and change it with
nothing.  If I click the form then I see it run a calculate but it pulls
nothing.

I am frustrated at this point and I have to be missing something obvious.

Jim
Signature

"Baliff.  Whack him in the pee-pee!"
"How come his is so much bigger then yours?"
"I am not even suppose to be here today!"

> Hi,
> you need to open form in design, and the open its module, then in
[quoted text clipped - 81 lines]
> >> >> > am
> >> >> > not able to load it since I don't have a copy of FoxPro.
Alex Dybenko - 26 Jul 2007 15:56 GMT
Hi,
try:
Me.Exception_Tbl_subform.Form.Filter = "MyDate=#" &
Format(Me.Calendar.Value, "mm\/dd\/yyyy") & "#"
Me.Exception_Tbl_subform.Form.FilterOn=True

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

> Alex..
>
[quoted text clipped - 117 lines]
>> >> >> > am
>> >> >> > not able to load it since I don't have a copy of FoxPro.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.