Paul, you *really* need to head Stuart's advice.
The data types are crucially important in database fields. Non-date values
(like the 3 letters TBC) are not valid dates, and cannot be evaluated as
dates.
On the other hand, Null is a valid and very meaningful value. It will be
processed correctly when you do things like counting the number of dates in
the field, averaging, or finding the nearest date. Using a fake date (such
as 11/11/11) will skew those results badly.
Further, you can *format* the Null value to *display* in any way you want -
using the letters TBC if you wish.
If you do have a field that accepts TBC, then you don't have a date/time
field.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<pa************ @hotmail.comwro te in message
news:7f******** *************** ***********@r66 g2000hsg.google groups.com...
Sorry, i meant that with that format it would only accept null values?
Paul
On Jul 24, 2:24 pm, "paulquinlan... @hotmail.com"
<paulquinlan... @hotmail.comwro te:
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...@myunre albox.comwrote:
<paulquinlan... @hotmail.comwro te in message
news:e3******** *************** ***********@s50 g2000hsb.google groups.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- Hide quoted text -
- Show quoted text -
4 2883
Thanks for all this, but when i set the format of the text box
to ;;;"TBC" it then correctly displays TBC when it contains a null
value, however, when the user trys to type an actual date into the
cell it says it isnt a valid for this field??
Thanks again
Paul
On Jul 24, 2:39*pm, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
Paul, you *really* need to head Stuart's advice.
The data types are crucially important in database fields. Non-date values
(like the 3 letters TBC) are not valid dates, and cannot be evaluated as
dates.
On the other hand, Null is a valid and very meaningful value. It will be
processed correctly when you do things like counting the number of dates in
the field, averaging, or finding the nearest date. Using a fake date (such
as 11/11/11) will skew those results badly.
Further, you can *format* the Null value to *display* in any way you want-
using the letters TBC if you wish.
If you do have a field that accepts TBC, then you don't have a date/time
field.
--
Allen Browne - Microsoft MVP. *Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<paulquinlan... @hotmail.comwro te in message
news:7f******** *************** ***********@r66 g2000hsg.google groups.com...
Sorry, i meant that with that format it would only accept null values?
Paul
On Jul 24, 2:24 pm, "paulquinlan... @hotmail.com"
<paulquinlan... @hotmail.comwro te:
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...@myunre albox.comwrote:
<paulquinlan... @hotmail.comwro te in message
>news:e3******* *************** ************@s5 0g2000hsb.googl egroups.com....
Hi
I have a bound form that displays a whole load of dates, in severalof
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 ableto
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- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
What happens if you expand the first parts:
mm/dd/yyyy;mm/dd/yyyy;mm/dd/yyyy;"TBC"
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<pa************ @hotmail.comwro te in message
news:28******** *************** ***********@a70 g2000hsh.google groups.com...
Thanks for all this, but when i set the format of the text box
to ;;;"TBC" it then correctly displays TBC when it contains a null
value, however, when the user trys to type an actual date into the
cell it says it isnt a valid for this field??
Thanks again
Paul
On Jul 24, 2:39 pm, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
Paul, you *really* need to head Stuart's advice.
The data types are crucially important in database fields. Non-date values
(like the 3 letters TBC) are not valid dates, and cannot be evaluated as
dates.
On the other hand, Null is a valid and very meaningful value. It will be
processed correctly when you do things like counting the number of dates
in
the field, averaging, or finding the nearest date. Using a fake date (such
as 11/11/11) will skew those results badly.
Further, you can *format* the Null value to *display* in any way you
want -
using the letters TBC if you wish.
If you do have a field that accepts TBC, then you don't have a date/time
field.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<paulquinlan... @hotmail.comwro te in message
news:7f******** *************** ***********@r66 g2000hsg.google groups.com...
Sorry, i meant that with that format it would only accept null values?
Paul
On Jul 24, 2:24 pm, "paulquinlan... @hotmail.com"
<paulquinlan... @hotmail.comwro te:
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...@myunre albox.comwrote:
<paulquinlan... @hotmail.comwro te in message
>news:e3******* *************** ************@s5 0g2000hsb.googl egroups.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- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
Thanks a lot guys, thats done the trick!
On Jul 24, 3:40*pm, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
What happens *if you expand the first parts:
* * mm/dd/yyyy;mm/dd/yyyy;mm/dd/yyyy;"TBC"
--
Allen Browne - Microsoft MVP. *Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.<paulquinla n...@hotmail.co mwrote in message
news:28******** *************** ***********@a70 g2000hsh.google groups.com...
Thanks for all this, but when i set the format of the text box
to ;;;"TBC" it then correctly displays TBC when it contains a null
value, however, when the user trys to type an actual date into the
cell it says it isnt a valid for this field??
Thanks again
Paul
On Jul 24, 2:39 pm, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
Paul, you *really* need to head Stuart's advice.
The data types are crucially important in database fields. Non-date values
(like the 3 letters TBC) are not valid dates, and cannot be evaluated as
dates.
On the other hand, Null is a valid and very meaningful value. It will be
processed correctly when you do things like counting the number of dates
in
the field, averaging, or finding the nearest date. Using a fake date (such
as 11/11/11) will skew those results badly.
Further, you can *format* the Null value to *display* in any way you
want -
using the letters TBC if you wish.
If you do have a field that accepts TBC, then you don't have a date/time
field.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<paulquinlan... @hotmail.comwro te in message
news:7f******** *************** ***********@r66 g2000hsg.google groups.com....
Sorry, i meant that with that format it would only accept null values?
Paul
On Jul 24, 2:24 pm, "paulquinlan... @hotmail.com"
<paulquinlan... @hotmail.comwro te:
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...@myunre albox.comwrote:
<paulquinlan... @hotmail.comwro te in message
news:e3******** *************** ***********@s50 g2000hsb.google groups.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- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
"Allen Browne" <Al*********@Se eSig.Invalidwro te in message
news:48******** *************** @per-qv1-newsreader-01.iinet.net.au ...
Clarification, Stuart:
These are numeric values, so the 3rd one is zero (not a zls.)
Dates can be zero (Dec 30 1999) or negative (before that.)
Right you are. Makes sense now you mention it. Thankyou.
However, after running a few tests, it seems that the middle two sections
are ignored when the data type is Date. At least I can't make it happen... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: usenet |
last post by:
I have inherited a table where date information was saved from PHP as a VARCHAR.
(Sigh.) This means that the so-called date fields look like this :
August 1, 2005, 9:09 am EDT
October 13, 2004, 12:28 pm EDT
This makes them essentially useless for sorting and logical evaluation.
Understandbly, the MySQL date functions don't seem able to...
|
by: Liz Malcolm |
last post by:
Hello and TIA. I have a DE form with an option group that if daily is
selected todays date is used for start and end date, if weekly is
selected Monday - Friday is used. I am trying to add a manual date
selection to clear the start and end date to allow the end user input
other days. I have taken into account our financial 1st and last day...
|
by: S. van Beek |
last post by:
Dear reader,
By a Date field with Now() as default value the content of the field is date
plus time.
As I need a filter in a query on date only (excluding time) I invented the
following solution:
|
by: Graham Feeley |
last post by:
I have a date field named rcdate
it is a general date eg:
12/08/2006 3:30:00 PM
12/08/2006 3:00:00 PM
I used to update another empty field named rdate with the
with using in a update query " Left(Ratings!RCDate,10)"
This now does not work for some reason
gives me the error
"undefined function in left function"
|
by: Pavkovich |
last post by:
I have tried to set a date field when I put a checkmark in a yes/no field. In the date fields control source I put the following: IIf(=0," ",Date())
Unfortunately using Date() simply changes the date each time the day changes. I want to store a date telling my when I put the checkmark in the yes/no field and I don't want that date to change....
| |
by: andrewbda |
last post by:
I have tickbox on a form, and I would like to use a date field as the
control source.
i.e. I would like to have it display as ticked when a date exists in
the field, and vice versa.
Also, when it is either checked or unchecked, I would like it to stamp
todays date or remove the date from the control source. I can see how
to do this if...
|
by: Finn Stampe Mikkelsen |
last post by:
Hi
I have defined a table in my database, with 2 date-fields. I have set a
default value to DBNull. I have integrated a nullable datetimepicker control
to my project and set the apropriate NullValue in my datagridview...
Everything works great, with a table-row added manually to the database,
without setting any value to the second...
|
by: sheri |
last post by:
I have a field called date, the date is in the field like this 70925
(which means Sept. 25, 2007).
I have another field called day, it is a text field. How do I write a
query to populate the day field from the date field?
Thanks for your help.
|
by: Jes |
last post by:
Dear all
I have a date field on a HTML form where the user is asked to key in
dd/mm/yyyy
However, when that is written to MySql it is either not accepted or
another value is tored in the database.
Is there any way to change value of this field back to yyyymmdd format
as accepted correctly in sql. ? The change should preferably be when...
|
by: beacon |
last post by:
Hi everybody,
I'm having a terrible time trying to accomplish what I thought would be extremely easy.
I have three date fields on a form (DischargeDate, ReceivedDate, and AuditedDate) and I'm trying to validate the AuditedDate and ReceivedDate fields compared to the DischargeDate field. Basically, any date entered into the AuditedDate or...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |