Error

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

Guest

I have a form with two textboxes: DD and dueDate. From the AfterUpdate event
of DD, 9 months is added to the dueDate and a function is called which tests
if a weekday falls on a weekend or Holiday. If true, the dueDate moves up to
the next business day. Works nicely. However, I need some error handling,
which I don't know how to do. For example, if someone entes 3/23/2006 in DD,
the dueDate correctly populates as 12/26/2006. Then, if 3/23/2006 is deleted
in DD before 12/26/03 is deleted in dueDate, I get an Type Mismatch error
'13'. I want to prevent the user from deleting DD before dueDate.
Thanks,
 
I have a form with two textboxes: DD and dueDate. From the AfterUpdate event
of DD, 9 months is added to the dueDate and a function is called which tests
if a weekday falls on a weekend or Holiday. If true, the dueDate moves up to
the next business day. Works nicely. However, I need some error handling,
which I don't know how to do. For example, if someone entes 3/23/2006 in DD,
the dueDate correctly populates as 12/26/2006. Then, if 3/23/2006 is deleted
in DD before 12/26/03 is deleted in dueDate, I get an Type Mismatch error
'13'. I want to prevent the user from deleting DD before dueDate.
Thanks,

Add code to the BeforeUpdate event of DD to test for Len(DD & "") =0 , then look
at dueDate and if not deleted either delete it yourself or warn the user and set
Cancel = True and Me.DD.UnDo

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
RuralGuy,
Thanks very much!
--
Howard


RuralGuy said:
Add code to the BeforeUpdate event of DD to test for Len(DD & "") =0 , then look
at dueDate and if not deleted either delete it yourself or warn the user and set
Cancel = True and Me.DD.UnDo

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
RuralGuy,
Thanks very much!

You're very welcome. Glad to assist.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

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

Similar Threads

Function 4
Help Doing a Lookup 2
Auto Update Duedate field 9
Date Function 7
Filter between dates 2
Duedate 3
Serious Problem with a Date count fields & YES/No field 4
first record query 1

Back
Top