473,320 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Access Calendar

rcollins
234 100+
I have a calendar on my form that inputs the date selected. Right now, the date isn't updated until I click on the date box after selecting the date. Is there a way for me to update as I click on the date>
Dec 21 '06 #1
16 3716
MMcCarthy
14,534 Expert Mod 8TB
I have a calendar on my form that inputs the date selected. Right now, the date isn't updated until I click on the date box after selecting the date. Is there a way for me to update as I click on the date>
In the after update event of the calendar object put a requery on the textbox

Expand|Select|Wrap|Line Numbers
  1. Me.textBoxName.Requery
Mary
Dec 21 '06 #2
rcollins
234 100+
I tried this and it made no difference. Is it because the calendar has On Updated rather than After Update?
Dec 22 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
I tried this and it made no difference. Is it because the calendar has On Updated rather than After Update?
Try the on click event instead
Dec 22 '06 #4
Killer42
8,435 Expert 8TB
Try the on click event instead
Hi Mary.

Is that version dependent? I just had a look at the Calendar Control 8.0 under Access 2000, and the only events it seems to have are:
  • On Updated
  • On Enter
  • On Exit
  • On Got Focus
  • On Lost Ficus
Would this be because I'm on an old version? Or perhaps some of the events aren't listed in the properties box?
Dec 27 '06 #5
willakawill
1,646 1GB
Hi Mary.

Is that version dependent? I just had a look at the Calendar Control 8.0 under Access 2000, and the only events it seems to have are:
  • On Updated
  • On Enter
  • On Exit
  • On Got Focus
  • On Lost Ficus
Would this be because I'm on an old version? Or perhaps some of the events aren't listed in the properties box?
You are only looking at the property list. All of the normal events can be handled in a code module including the click event
Dec 27 '06 #6
Killer42
8,435 Expert 8TB
You are only looking at the property list. All of the normal events can be handled in a code module including the click event
Thanks Will, I'll have to try and remember that. Sometimes the differences between "real" VB and VBA can be frustrating.
Dec 27 '06 #7
tm2
4
Would someone explain in a "Dummy" format how to accomplish this? I understand how to program events (in VBA, that is), or at least I thought I did. I wish to requery a list control once the Calendar control has been changed. I saw a post where the events can still be programmed even if they are not available in the property list. Please provide more info.

Thanks
Jan 29 '07 #8
missinglinq
3,532 Expert 2GB
Don't have a clue why Access only lists some of the events for comboboxes in the Property Box! To gain access to the others you need to go into the code Editor for your form. At the top are two dropdown boxes. When you initially enter the editor the lefthand box will say "General" and the righthand one will say "Declarations."

Go into the lefthand box and scroll down to the name of the combobox. Once this is selected drop down the righthand box, where find all of the related events, and scroll down to whatever event your interested in. This will take you to the appropriate sub, or somewhere close to it! Doesn't always land right on the mark, so check the name of the sub! This is also how you can quickly navigate to a particular sub within the form's code module.
Jan 29 '07 #9
Killer42
8,435 Expert 8TB
...This will take you to the appropriate sub, or somewhere close to it! Doesn't always land right on the mark, so check the name of the sub!
Excellent advice, linq. But the highlighted part worries me. Are you saying that your VB sometimes shows the wrong sub?! How can that be?
Jan 29 '07 #10
tm2
4
OHH! That's neat! But you know what's puzzling? I have an ActiveX Calendar control on my form. When a different date is selected, I want a list box to requery without having to move off of the calendar control. How can I capture the "change" of selected date?

[Private Sub CalDate_Click()
Me.CurList.Requery
End Sub]

This doesn't work...
Jan 29 '07 #11
rcollins
234 100+
so i realy apreciate all of the input. I still am learning more with each reply. Which one of these would make my date text box equal what is active on the calendar?
Here are My choices for the calendar
[code]
After Update
Before Update
Click
Double Click Enter
Exit
Got Focus
Key Down
Key Press
Key Up
Lost Focus
New Month
New Year
Updated
[/CODE
Jan 29 '07 #12
Killer42
8,435 Expert 8TB
so i realy apreciate all of the input. I still am learning more with each reply. Which one of these would make my date text box equal what is active on the calendar?
Here are My choices for the calendar
Expand|Select|Wrap|Line Numbers
  1. After Update
  2. Before Update
  3. Click
  4. Double Click Enter
  5. Exit
  6. Got Focus
  7. Key Down
  8. Key Press 
  9. Key Up
  10. Lost Focus
  11. New Month
  12. New Year
  13. Updated
  14.  
You could research it by placing some code in each event to display the value in the calendar control (and the name of the event, of course). As soon as you find the event which fires at the right time and shows the right value, that's the one you want. Then just place the code there to populate the textbox.
Jan 29 '07 #13
Killer42
8,435 Expert 8TB
OHH! That's neat! But you know what's puzzling? I have an ActiveX Calendar control on my form. When a different date is selected, I want a list box to requery without having to move off of the calendar control. How can I capture the "change" of selected date?
Expand|Select|Wrap|Line Numbers
  1. Private Sub CalDate_Click()
  2. Me.CurList.Requery
  3. End Sub
What's the source of the listbox items? Perhaps it's being repopulated with the same list.
Jan 29 '07 #14
tm2
4
What's the source of the listbox items? Perhaps it's being repopulated with the same list.

The Source is SQL statement which pulls info based on the date selected in current form. The date has to be selected first before the list is populated.
Jan 29 '07 #15
Killer42
8,435 Expert 8TB
The Source is SQL statement which pulls info based on the date selected in current form. The date has to be selected first before the list is populated.
Ok. But can you give us more detail on exactly what doesn't work? For instance, does the Click event fire when you expect? And if so, does the calendar show the value you expect?
Jan 29 '07 #16
tm2
4
The Source is SQL statement which pulls info based on the date selected in current form. The date has to be selected first before the list is populated.
I got it! It's the little things that get me sometimes...
I had to "Refresh" the form before the list "Requery". It works perfectly now.

Thanks, Killer!
Jan 29 '07 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Michael Holberton | last post by:
Hi All, I have Access 97, 2000 & 2002 installed in different directories under Win2K Server on a new PC box I built. The Calendar Control on my Date Selector Form is not working and causing...
1
by: Adonis Walmsley-McCarthy | last post by:
Hello all, I have been asked to design a database in MS Access 2000. One of the requirements is that there is a calendar that displays its data in the form of a timeline. Would an ActiveX...
1
by: Norman Fritag | last post by:
Hi there I have avoided to use active x controls because I thought they are causing more problems then they are doing any good. I a new application I would want to use the tree and list view...
3
by: Matthew | last post by:
I currently have a form in MS Access that has certain combo boxes which specify criteria in order to run a query based on that criteria. I want to add to this, a calendar from which a user will be...
1
by: Andy Davis | last post by:
Is it possible to link data from an Access database with Outlook? My client would like to be able to have a calendar similar to that in MS Outlook whereby they can type daily tasks on the calendar...
3
by: Hutty | last post by:
I'm trying create a calendar control that updates an access database with events. I have some code I managed to piece together. First error I'm running into is the Mycommand.ExecuteNonQuery(). I...
7
by: Mike Charney | last post by:
I am trying to use the calendar control in Access (Calendar Control 11.0) I have it working but for only one form. I do not know VB/VBA very well, but how can I open the calendar control, which...
5
by: Ben | last post by:
I have a javascript code in the ASP.NET page. I want to access Calendar control that is inside ASP page and is "run at server". I try to use following code but it doesn't work. <script...
1
by: afr0ninja | last post by:
Hello all, and thank you in advance for your assistance. I'm pretty new to access and I'm trying to teach myself some VBA by using various bits of code I find here and there mixed with my own....
1
by: xian2 | last post by:
Hi, I wanted to create a calendar in Access that would call on data stored within tables in the database (dates in forms) and would show it visually on a calendar when the calendar was opened. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.