Go Back   Access World Forums > Microsoft Access Discussion > Tables

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 07-13-2018, 09:00 PM   #1
Clicky
Newly Registered User
 
Join Date: Jul 2018
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Clicky is on a distinguished road
Number field that accepts a period

Is there a number field that will accept a period as the only entry? Trying to create a variable for number of days but would like a period to signify missing/not reported. Is there a way to do that besides designating the field as a text field? Thanks!

Clicky is offline   Reply With Quote
Old 07-13-2018, 09:52 PM   #2
arnelgp
Registered User
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 6,187
Thanks: 54
Thanked 1,985 Times in 1,898 Posts
arnelgp is a jewel in the rough arnelgp is a jewel in the rough arnelgp is a jewel in the rough arnelgp is a jewel in the rough
Re: Number field that accepts a period

No. Blank can signify missing.
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
Old 07-14-2018, 05:30 AM   #3
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 27,198
Thanks: 13
Thanked 1,363 Times in 1,299 Posts
Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light
Re: Number field that accepts a period

Null is used to signify unknown. There is no reason to create an arbitrary additional value. Decimal points are not stored in numeric fields. The decimal point is strictly for display purposes so No, you cannot store just a period unless you define the field as text which will cause other problems.

__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Old 07-14-2018, 06:05 AM   #4
Clicky
Newly Registered User
 
Join Date: Jul 2018
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Clicky is on a distinguished road
Re: Number field that accepts a period

Thanks for the replies! It would be nicer to have a specific entry for missing/not reported as null/blank could mean a user forgot to answer it, but I have a work-around. Thanks!
Clicky is offline   Reply With Quote
Old 07-14-2018, 09:43 AM   #5
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 11,802
Thanks: 52
Thanked 1,058 Times in 967 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: Number field that accepts a period

In general,using some specific value of a user's response to mean something special is a bad choice. Like using a question such as "On a scale of 1 to 10, how would you rate...?" and then using 0 as "no answer (passive)", -1 for "expressly claims to have no opinion", -2 for "expressly declined to answer", -3 for "VEHEMENTLY declined to answer (and the assault trial starts next week)" and so on.

The reason it is a bad idea is that it quickly devolves into a situation where the answer means two different things depending on values. I.e. in one range, it is a usable set of values, but in another range it says someone about the person, not about the answer. This makes queries tougher when you want to take average responses. If you are splitting hairs, one could argue the point (admittedly not strongly) that using two possible classes of meanings for the same field is a normalization violation because in one range it is data but in another range it is metadata.

It is far better to have a yes/no flag somewhere that says "no answer" and if the flag is NOT set for "no answer" then you look at the slot contents. That's a FAR easier WHERE clause to write.

If you have a data entry form, it is easy to have the flag default to the "No Answer" case but then put a Change event handler behind the code value. If someone offers a number, the Change event handler can reset the flag behind the scenes so the flag needs neither a separate control nor explicit maintenance.
__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is offline   Reply With Quote
The Following User Says Thank You to The_Doc_Man For This Useful Post:
Gasman (07-14-2018)
Old 07-14-2018, 01:46 PM   #6
Clicky
Newly Registered User
 
Join Date: Jul 2018
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Clicky is on a distinguished road
Re: Number field that accepts a period

Thanks for the reply! I created a drop down field to ask Yes/No if info is available and then the next field is if Yes, to enter the #. Thanks again!

Clicky is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Count number of sales in a set time period Hursty19 Forms 1 10-23-2013 11:02 AM
Number of Days that fall in a Period Ronanm Queries 4 01-25-2013 03:45 AM
Overload resolution failed because no accessible 'fields' accepts this number of args bwaila Tables 1 09-28-2009 12:59 AM
Table validation rule - field accepts only A-Z naminder Tables 2 02-09-2006 04:31 AM
Period based on week number sponge General 2 08-24-2005 03:16 AM




All times are GMT -8. The time now is 04:02 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World