Allen Browne's calender

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I've successfully imported AB's cal into my Database and it works perfectly
except for the following:
I have another field called "Day" which works off the result of the data
being input into the "Date" field to generate the day of the week.
If I write the date via keybord into the Date field then the Day field auto
updates via AfterUpdate. Fine.
If, however, I use AB's cal to input the Date then the Day field will not
update for the day of the week.
Am I missing something or is there a link or something to tick to make the
data update using AB's cal. (My preference).
I hope all the above makes sense lol
By the way, exxo calender.

Kevin
 
You have probably set up On Click property of your command button to
something like this:
=CalendarFor([SaleDate], "Select the sale date")

If you want the AfterUpdate event of SaleDate to fire after calling the
calendar, change the On Click property to:
[Event Procedure]
Click the Build button (...) beside this.
Access opens the code window.
Betweeen the "Private Sub..." and "End Sub" lines, enter:
Call CalendarFor([SaleDate], "Select the sale date")
Call SaleDate_AfterUpdate

This occurs because Access does not trigger the events of a control if it is
updated programmatically--only if you type into the control.
 
As so often in Access, there is more than one way to skin..... etc.

Typically I use a double click to call the date/calendar, and I simply
have the dblclick event call the afterupdate subroutine (after
returning from the calendar)

I have also seen some apps where you cannot update the date except
through the calendar call so then obviously everything is done on the
dblclick or button event.

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top