• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 968
  • Last Modified:

MS Access - Unlimited or Infinity

Is there a way or symbol that can be entered into a number field to represent infinity or unlimited in a Microsoft Access database??
0
geekhelp
Asked:
geekhelp
1 Solution
 
eric_duncanCommented:
My understanding is that the number field has to have either a discrete value or null. I have seen other people solve this issue by "reserving" a specific value that will be used to indicate infinity - this is often the upper bound of the number field or a null value. The advantage of using null, if you don't need it otherwise, is that mathematical operations using null closely resemble mathematical operations using inifinity because the result is always null.

Let me know if this helps!

eric
0
 
Ryan ChongCommented:
>>Is there a way or symbol that can be entered into a number field to represent infinity or unlimited in a Microsoft Access database??
The simplest way is to assign an 'impossible' value as Default to the number field to represent the 'infinity' or 'unlimited' value, like put a value of -1 in your field's Default value ?
0
 
CarlovskiCommented:
Eric is right,
Database nulls, and infinity do share many properties, but using a Null is likely to really confuse people who aren't used to databases, or mathematics!
Also, the properties that they do share, may not be want you want (i.e nothing is ever equal to eiher Null or infinity, even null or infinity!)
The safest thing may be to hold if it is infinite value in a separate field (Being picky, numeric fields should hold discrete values)
What exactly are you trying to record?
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
geekhelpAuthor Commented:
The field is for a Doggy Daycare database - It keeps track of how many "available passes" the dog owner has on their account. When a dog is "Checked in" to our facility a pass is automatically deducted from this field.
Owners can purchase a monthly unlimited pass and I am trying to figure out how I can represent this in the database, so that it stays the same even when the field has 1 subtracted from it. Thanks
0
 
eric_duncanCommented:
There isn't any way you can make the database handle this situation automatically - you are going to have to use some application logic to figure out whether or not someone has an unlimited pass or not. Probably the easiest way to do that would be to add a Boolean field to the table to track whether or not someone has unlimited passes on their account and then check this value in your application logic.

Eric
0
 
geekhelpAuthor Commented:
Thank You all who helped reach this conclusion!
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now