Is there anyway to be able to differentiate whether the one date field contains either estimated or

C

Chris K

I need to pre-populate a field with and estimated end date (based on start
date) but allow user to replace it with an actual start date

Is there anyway to be able to differentiate whether the one date field
contains either estimated or actual date

I dont think is possible with a date type field without involving/adding
another field
 
A

Access Developer

You are correct. There's no way to differentiate between an estimated data
and an actual date in the date field itself.

If you add another field, you can set it to "Actual" in the AfterUpdate
event of the date field, but, of course, there's still no way to determine
if the user entered the actual date, or just accidentally moved to the date
field and made a change by mistake.
 
D

David Kaye

Chris K said:
Is there anyway to be able to differentiate whether the one date field
contains either estimated or actual date

It's a stupid fix that I don't recommend because it's poor programming
practice, BUT given that the date field is really a date & time field (the
date being a whole number and the time being a decimal), you could set the
time to some consistent arbitrary number such as 6:00am (.25) for the
estimated date and to 12:00am (0.0) for the actual date.

Thus, when you read back the date, if the time says 6:00am then you know you
have an estimated date.
 
C

Chris K

Good idea - I think I'll give that a spin



David Kaye said:
It's a stupid fix that I don't recommend because it's poor programming
practice, BUT given that the date field is really a date & time field (the
date being a whole number and the time being a decimal), you could set the
time to some consistent arbitrary number such as 6:00am (.25) for the
estimated date and to 12:00am (0.0) for the actual date.

Thus, when you read back the date, if the time says 6:00am then you know
you
have an estimated date.
 
D

David W. Fenton

Good idea - I think I'll give that a spin

As David quite correctly says in his response, it's actually a
TERRIBLE idea.

This is precisely the kind of thing that caused many of the Y2K
problems, e.g., "magic" date values like 9/9/99 that everybody knew
could never be a problem that came back to bite them.

You need another field to do what you you require. It can't be done
with just a date field, except with terrible kludges like the one
David suggested (while also pointing out it was a BAD IDEA).
 
D

David Kaye

David W. Fenton said:
This is precisely the kind of thing that caused many of the Y2K
problems, e.g., "magic" date values like 9/9/99 that everybody knew
could never be a problem that came back to bite them.

Yes, if there's ever a need in the future to put a time with that date then
he's screwed.
 
D

David W. Fenton

(e-mail address removed) (David Kaye) wrote in
Yes, if there's ever a need in the future to put a time with that
date then he's screwed.

....which is precisely what you warned against in your initial
response.

*sigh*
 
D

David Kaye

David W. Fenton said:
....which is precisely what you warned against in your initial
response.

No, actually I didn't. I just said it was bad programming practice. David,
why don't you just go away. It's bad enough to have to deal with you in
soc.motss.
 
D

David W. Fenton

(e-mail address removed) (David Kaye) wrote in
No, actually I didn't. I just said it was bad programming
practice. David, why don't you just go away. It's bad enough to
have to deal with you in soc.motss.

Wow.

Just wow.

I was trying to point out that you gave good advice, and you get all
pissy about it.

I'm not going anywhere -- I've been posting in Access Usenet groups
since 1996, and believe I'm a valued member of the community, since
I get a lot of thanks for my help.

What have you ever done for the Access user/developer community?

<PLONK>
 
D

David W. Fenton

(e-mail address removed) (David Kaye) wrote in

[]

Just to explain:

David Kaye has a history in the newsgroup soc.motss. He doesn't read
carefully what other people post there, and often posts appallingly
insulting and stupid things there. In that newsgroup his behavior
has been narcissistic and childish.

When I saw him post here, I was hearted to see that he was giving
reasonably good advice. I was trying to be collegial and back up
what he'd recommended, as a way of showing that I didn't carry over
to the Access newsgroups any baggage accumulated during past
interactions.

But David didn't do that himself.

Examine the exchange that led up to my <PLONK> -- show me where I
did anything other than stand beside David and support his advice.
 

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

Top