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.

Photo

Microsoft Access Format/validation ?


  • Please log in to reply
No replies to this topic

#1 James Bond

James Bond

  • Members
  • 21 posts
  • OFFLINE
  •  
  • Location:Non-exotic city of Leicester from the Land of Hope & Glory
  • Local time:06:02 AM

Posted 04 February 2006 - 08:39 AM

Wonder if anyone could possibly help by pointing me in the right direction towards the problem that a friend of mine is experiencing while working on Microsoft Access.

Firstly, he's "Account No" field with Data Type as "Number" & in the "Field Properties" at the bottom, he's Field Size set to "Integer" & Format to "00000". However, what we want is a RANDOM NUMBER (so NO increament) of EXACT 5 digit appearing automatically, when we start creating a new record. Sadly, all we get is ONLY "00000" written in the "Account No" field.

Secondly, he's "Card Number" field with Data Type as "Number" & in the "Field Properties" at the bottom, he's Field Size set to "Long Integer" & Format to "0000 0000 0000 0000". However, what we want is a RANDOM NUMBER (so again, NO increment) of EXACT 16 digits appearning automatically, when we start creating a new record. Again, sadly, all we get is ONLY "0000 0000 0000 0000" written in the "Card Number" field.

Additionally, in "Card Number" what we want is ONLY 19 character in the format "0000(space)0000(space)0000(space)0000", all generating AUTOMATICALLY, so users won't have to type in long numbers manually.

Firstly, we can't have TWO Auto Numbers in one table (since Access don't allow it) & secondly, if we do "AutoNumber" as Data Type for say "Account No" & in "Field Properties", Field Size at Long Integer (the only available option other than Replication ID, which I've NO CLUE whatsoever) & the "Format" as "0000 0000 0000 0000", we can't get exactly the requirements I mentioned above, since sometimes we get negative numbers & sometimes with decimals in it.

He'll have many tables by the time he finishes, since it's bank a/c database he's creating & "Account Number" would be a Primary Key.

Wonder if there's any way, we could achieve what's required ???
Nope, I'm NOT God, but I'm British (which is the next best thing ;)

BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users