Tags: access, adate, calendar, click, code, database, date, detail, double, field, form, header, inthe, microsoft, mysql, oracle, section, sql, text, update, working

After Update not working

On Database » Microsoft Access

1,870 words with 1 Comments; publish: Wed, 28 May 2008 14:32:00 GMT; (25046.88, « »)

I have a form with a calendar in the header and I have a

date text field in the detail section. I have put code in

the double click of the date field which brings the

calendar date in and that works just fine. The problem is

I have code in the After Update event of the date field

that doesn't run when I use the double click method. If I

manually enter the date the code works just fine. If I put

the same code after the code in the double click event it

also works but the user may not always double click to

bring the date in. That leaves me with putting the same

code in both the double click and after update events. It

seems like there should be a less redundant way to do

this. Any ideas?

All Comments

Leave a comment...

  • 1 Comments
    • Alan,

      One way to handle this sort of situation is, for example, put the code

      in the After Update event, and then, at the end of the DoubleClick

      event, you can put the equivalent of...

      Call MyDateField_AfterUpdate

      Steve Schapel, Microsoft Access MVP

      Alan Fisher wrote:

      > I have a form with a calendar in the header and I have a

      > date text field in the detail section. I have put code in

      > the double click of the date field which brings the

      > calendar date in and that works just fine. The problem is

      > I have code in the After Update event of the date field

      > that doesn't run when I use the double click method. If I

      > manually enter the date the code works just fine. If I put

      > the same code after the code in the double click event it

      > also works but the user may not always double click to

      > bring the date in. That leaves me with putting the same

      > code in both the double click and after update events. It

      > seems like there should be a less redundant way to do

      > this. Any ideas?

      #1; Wed, 28 May 2008 14:33:00 GMT