W
Walter
Hi Dirk,
Sorry for taking so long to get back but I've been trucking. Gotta pay the
bills. I am trying to validate the trip date with this code. Chances of an
error are slim but people do make mistakes and I'm trying to cover all
possibilities. At present the date is entered first although not an absolute
necessity but it seems to me to be the most logical order. The TruckID is a
combo box with Limit to List set so it would be very unlikely to have a
mistake here. I had originally put the code in the AfterUpdate event but was
advised that it would be better it the BeforeUpdate event. My idea is you
know what truck you are working with but it is theoretically possible that
either a driver put a wrong date on a trip sheet or the date was entered
incorrectly. Generating this error will cause the user to be sure that the
data is correct. It seems to me that it would be better to validate now
rather than completing the whole form first in case there was a problem with
the trip sheet and the record could not be entered at this time. I don't
like the wasted effort of entering data that may be undone. My goal is to
make this as user friendly as I possibly can such as choosing from lists
whenever possible and also validating the other data to assure correctness.
Thanks again for your help and advice.
Walter
Sorry for taking so long to get back but I've been trucking. Gotta pay the
bills. I am trying to validate the trip date with this code. Chances of an
error are slim but people do make mistakes and I'm trying to cover all
possibilities. At present the date is entered first although not an absolute
necessity but it seems to me to be the most logical order. The TruckID is a
combo box with Limit to List set so it would be very unlikely to have a
mistake here. I had originally put the code in the AfterUpdate event but was
advised that it would be better it the BeforeUpdate event. My idea is you
know what truck you are working with but it is theoretically possible that
either a driver put a wrong date on a trip sheet or the date was entered
incorrectly. Generating this error will cause the user to be sure that the
data is correct. It seems to me that it would be better to validate now
rather than completing the whole form first in case there was a problem with
the trip sheet and the record could not be entered at this time. I don't
like the wasted effort of entering data that may be undone. My goal is to
make this as user friendly as I possibly can such as choosing from lists
whenever possible and also validating the other data to assure correctness.
Thanks again for your help and advice.
Walter