Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Microsoft Access Field Format ?

  • Please log in to reply
1 reply to this topic

#1 James Bond

James Bond

  • Members
  • 21 posts
  • Location:Non-exotic city of Leicester from the Land of Hope & Glory
  • Local time:07:09 PM

Posted 19 January 2006 - 05:27 PM

Friend of mine is working on making a Bank Database in Microsoft Access.

After trying different validation format, we failed to get exactly what we wanted.

We did the setting for "Account Number" as "AutoNumber" & set the format in the way, that every time the new record gets created, this "Account Number" keeps on increasing by one (which we did by having "New Values as Increment"). However, since account number we want needs to be at least 5 digit long, I wonder how do we go about doing so ???

Furthermore, in another table, we want to set some sort of format for "Credit/Debit Card" in the way, that it has to be 16 digit long with "space" after each of the 4 digit i.e. in the format "0000 0000 0000 0000" & we wish this to be "Auto Number" & New Values as "Random", however, when we tried we kept on getting "-" sign in front of some of these "Credit/Debit Card" number, once we start typing other details. Additionally, what we want is even if we type in say "1000100010001000", some sort of format/validation automatically changing it to "1000 1000 1000 1000" (i.e. space after 4 digits) & we also want validation, which means the digit should NOT go over 16 & should NOT be less than 16.

Can anyone help in getting what we want in both of these cases i.e. the "Account Number" & "Credit/Debit Card".

Edited by James Bond, 19 January 2006 - 05:35 PM.

Nope, I'm NOT God, but I'm British (which is the next best thing ;)

BC AdBot (Login to Remove)


#2 Rimmer


  • Members
  • 2,159 posts
  • Location:near Sydney, Australia
  • Local time:05:09 AM

Posted 21 January 2006 - 07:35 PM

Account number - maybe this will help: http://support.microsoft.com/kb/209696/en-us

Credit card - sorry, I can't follow what's going on. Does this apply?:

Is the problem that some of the random numbers are negative?
I tried it out with 8 digits -
Format = fixed
Default Value= Abs(100000000*Rnd(88888888))
- and it seemed to work OK.


Edited by Rimmer, 21 January 2006 - 09:53 PM.

Soltek QBIC, Pentium 4 3.0GHz, 512MB RAM, 200GB SATA HDD, ATI Radeon 9600XT 256MB, Netgear 54Mb/s WAP, ridiculously expensive Satellite Broadband
Windows XP Home SP2, Trend Micro Internet Security, Firefox, Thunderbird, AdAwareSE, Spybot S&D, SpywareBlaster, A-squared Free, Ewido Security Suite.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users