Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 5th, 2007, 10:16 AM
Authorized User
Join Date: Apr 2006
Location: , , .
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default text vs integer

Hi everyone,

I have a question is it true that working with numerical fields is quicker than text fields.
for example we have a connote with number 12345689 my colleagues converts this into text but I use number what is correct and is there doucmentation explaining why text or numbers is faster

Reply With Quote
  #2 (permalink)  
Old February 5th, 2007, 01:05 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

What do you mean when you say "working with numerical fields is quicker than text fields"?

What are you trying to do? Generally you use number data types only when doing calculations. If you are storing a number that will not be used in calculations, such as phone numbers and zip codes, you use text. If you are doing any calculations, except for currency, you use number, and currency for cash.

If you use a number field where you want a text field, then you can end up with formatting issues and erroneous equations when doing queries.

I don't ever recall seeing that numbers work faster than text, except perhaps in this case where your colleagues are converting the data (presumably in code [re-typing a variable]) and that will always add time to a function or subroutine - but not much usually, unless it is a big batch job. I think otherwise the only thing that would determine the speed of the operation is the AMOUNT of data stored in the field, and not necessarily the data type. If you are using 9 character values in your text field, set the field size to 9, and this will speed up the operations in the aggregate.

Did that help any?

Reply With Quote
  #3 (permalink)  
Old February 13th, 2007, 10:50 PM
Registered User
Join Date: Jun 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

In Access a Long Integer field can store figures up to 2,147,483,647
If there is no formatting issue such as connote's begining with a letter or preceded by a zero then a number field in a database will be smaller to store, take up less space to index, be faster to search and faster when joining by that field in a query.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Integer Problem needelp Access VBA 3 October 27th, 2006 09:47 AM
testing integer rjonk XSLT 2 July 27th, 2006 03:11 PM
Integer Size Miquella C++ Programming 7 November 6th, 2005 10:31 PM
Integer Check awais_syed VB.NET 2002/2003 Basics 2 December 18th, 2004 02:04 AM
Convert string from text box to integer ja8261 VB.NET 2002/2003 Basics 5 November 6th, 2004 10:04 PM

All times are GMT -4. The time now is 09:31 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.