Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Allen Browne's calender

Discussion in 'Information Technology' started by KevinT, Jul 28, 2006.

  1. KevinT

    KevinT
    Expand Collapse
    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
     
  2. Loading...


  3. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    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.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "KevinT" <KevinT@discussions.microsoft.com> wrote in message
    news:8AEB5A61-2CD1-427C-83F1-39ED85E121C1@microsoft.com...
    > 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
     
  4. Ron2006

    Ron2006
    Expand Collapse
    Guest

    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
     

Share This Page