468,765 Members | 1,720 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Use TBC in a date field

Hi

I have a bound form that displays a whole load of dates, in several of
these i would like to be able to show "TBC" rather than a blank field.
I'm guessing i could store a date in the fields that would clearly not
be relevent eg. 11/11/1111.

But is it possible where a bound text box contains the date 11/11/1111
to get it to show "TBC"? Ideally i'd also like the users to be able to
type TBC and it automatically store the date 11/11/1111.

Thanks for any suggestions.
Paul
Jul 24 '08 #1
2 1331
<pa************@hotmail.comwrote in message
news:e3**********************************@s50g2000 hsb.googlegroups.com...
Hi

I have a bound form that displays a whole load of dates, in several of
these i would like to be able to show "TBC" rather than a blank field.
I'm guessing i could store a date in the fields that would clearly not
be relevent eg. 11/11/1111.

But is it possible where a bound text box contains the date 11/11/1111
to get it to show "TBC"? Ideally i'd also like the users to be able to
type TBC and it automatically store the date 11/11/1111.

Thanks for any suggestions.
Paul
Try this: instead of 11/11/1111, use Null. Then set the format property for
the textbox to:
;;;"TBC"

To store Null when the user types TBC: Put this code in the textbox's
BeforeUpdate event procedure:

If Me.TextboxName.Value = "TBC" Then
Me.TextboxName.Value = Null
End If
Jul 24 '08 #2
Thanks Stuart

The problem, i have now is that when the user actually does type a
date it says "the value you entered isnt valid for this field" and the
only value it will accept is TBC.

Any ideas
Thanks
Paul
On Jul 24, 2:05*pm, "Stuart McCall" <smcc...@myunrealbox.comwrote:
<paulquinlan...@hotmail.comwrote in message

news:e3**********************************@s50g2000 hsb.googlegroups.com...
Hi
I have a bound form that displays a whole load of dates, in several of
these i would like to be able to show "TBC" rather than a blank field.
I'm guessing i could store a date in the fields that would clearly not
be relevent eg. 11/11/1111.
But is it possible where a bound text box contains the date 11/11/1111
to get it to show "TBC"? Ideally i'd also like the users to be able to
type TBC and it automatically store the date 11/11/1111.
Thanks for any suggestions.
Paul

Try this: instead of 11/11/1111, use Null. Then set the format property for
the textbox to:
;;;"TBC"

To store Null when the user types TBC: Put this code in the textbox's
BeforeUpdate event procedure:

If Me.TextboxName.Value = "TBC" Then
* * Me.TextboxName.Value = Null
End If
Jul 24 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by vnl | last post: by
10 posts views Thread by Kenneth | last post: by
1 post views Thread by EV | last post: by
1 post views Thread by Monica Roman | last post: by
1 post views Thread by Graham Feeley | last post: by
7 posts views Thread by sheri | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.