Is Trimming Field Size Where Suitable Good Practice?

Jun 6, 2007

If I have a DB with several tables containing thousands of records, and most of those records only ever need say 8 characters, does anyone know if changing the field size from default 255 chars to 8 chars will actually benefits the the DB?

Potential benefits I'm thinking may occur are reduced filesize and maybe some speed?

View Replies


ADVERTISEMENT

Good Practice Or Bad?

Mar 9, 2006

A developer where I am contracted to constructs his If statements like this:
If Day(Now()) <> 1 Then DoCmd.OpenQuery "qry_06c_Get_CurMon_Rebates"

Instead of like this:
If Day(Now()) <> 1 Then
DoCmd.OpenQuery "qry_06c_Get_CurMon_Rebates"
End If

All on one line and no end if needed. I didn't even know that would work.
Is this good or bad practice from a coding standpoint? Any Pitfalls?
Thanks

View 5 Replies View Related

Large Field Size = Larger Overall Database Size?

Aug 29, 2005

Will keeping your field size shorter result in a smaller MDB file?

Or does Access only use as much space as there is real data in its fields.

Way back in the dBASE III days, dBASE would pad all your "real" information with as many spaces as necessary to fill up your field. I suspect that the MDB structure is probably smarter than that.


Another question on the same topic - I believe there is a maximum number of characters in a record (4000?). Can your field sizes add up to more than 4000, as long as the actual data, all combined, never totals 4000...?
Thanks............
..dc

View 3 Replies View Related

General :: How To Set Up A Suitable Relationship Between 2 Tables

Feb 17, 2013

the line setting up a property database and i cant figure out how to set up a suitable relationship between 2 tables .

Table 1 is for leases, which can have up to 4 tenants (each has seperate field)
Table 2 is a table for each tenant

now I need to relate the two, each lease can have multiple tenants at the same time and each tenant can have multiple leases over several years.

View 3 Replies View Related

Tables :: Suitable Table Structure To Distribute Payments Among Different Bank Accounts

Aug 17, 2015

Looking for efficient table structure for this. Let's say I have a list of contractors who will get paid a certain amount of money each week. The amount of money changes each week by measuring the amount of work done, giving it a price and calculating it. The fields are these:

[pk]WeeklyWorkID
WorkID
Quantity
UnitPrice
Total=Qty*UnitPrice (not stored in this table)
EmployeeID
WeekID

So far, it's all good, but we wish to pay the contractors in an unusual way. Let's say he makes $16,000 of work this week, and we want to pay him using cash AND/OR either one or multiple debit cards. For example:

Cash: $1,500
Debit card 45: $7,500
Debit card 71: $4,000
Debit card 13: $3,000
Total = $ 16,000

We can only deposit $7,500 max in each card. But it's even worse... two or more contractors can SHARE the card and it's not always the same card. Sounds pretty funky, but it's what the company wants to do. So, what would you recommend me in this case?

I'm guessing I'm gonna need these tables: tbWeeks to hold the week number, tbCards to store the cards' info, and an extra table to make a many to many relationship between the cards and the employees.

View 2 Replies View Related

Trimming Characters

Feb 25, 2007

Good Morning to all

i would like to kindly ask if there is a pre defined function in the VBA SQL of access in which it will trim a certain field programmatically

for example

Old string = Manila-MSE Building - 30.26f
New String = Manila-MSE Building

Thanks for your help

View 4 Replies View Related

Trimming An Address

Mar 21, 2007

I have a table that has about 5000 street addresses (ex. 1234 your st.). I want to get the all the characters until the first space. So for (1234 Your St.) I want to get 1234 for W1234 St I want W1234. Is this possible?

View 1 Replies View Related

Trimming Query Return Value

Aug 25, 2005

HI, i have a field in a query called [cost_type], these typically contains the values "principle works" or "additional works" how can i set the query up so that it doesn't return the "works" part of the record? Could i just return the first 10 characters of the result?
thanks

View 1 Replies View Related

Trimming Data In Listbox

Oct 26, 2006

Another issue for my contacts database for work. I have a listbox on the edit contacts form that lists all contacts in the database.

The listbox rowsource is
SELECT [ContactID], [LastName] & ", " & [NamePrefix] & " " & [FirstName] & " " & [Business/Organization] FROM tblContacts ORDER BY [LastName] & ", " & [FirstName] & " " & [Business/Organization];

Some of the contacts that are businesses or organizations, do not actually have the first and last name filled in, just the business/organization name. So what happens in the list I get all of the entries that do not have FirstName/LastName at the top of the list, with the Business name following a few spaces. The way it looks is:

, Stop & Shop Supermarkets

But I would like to trim that beginning part if there is no FirstName/LastName so that Stop & Shop Supermarkets gets sorted with the S's, like this:

Stabile, Lisa
Stop & Shop Supermarkets
Stott, Joan

Is there something I need to put in the rowsource to accomplish this? I've searched these forums for an answer, and turned up no results.

Attached, I have a screenshot of the form with the listbox.

Thanks
ScrmingWhisprs

View 4 Replies View Related

Trimming Off First 7 Characters In A String

Oct 21, 2005

My DB is on SQL Server with an Access adp front end.

SQL uses the Windows NT user name and password for security and also pulls in the user name into a field in every record so we know who has added and modified it.

For one table we are actually using the user name field on the form and in a report for reasons other than security.

The user name is filled in with first the name of the network group, then a slash, then the user name itself. So there are 7 characters I don't really care about.

Is there a way in VBA to remove those first seven characters and only show what comes afterwards? Thanks for the help!

View 3 Replies View Related

Best Practice For Charts?

Jan 3, 2007

Deal All

I've got some simple charts to do in Access. They are working fine - except for the Legends.

The problem is that my table (on which the charts are based) is fed by Combo boxes which populate the table with codes, rather than a descriptor.

For example, the combo box on the input form displays two columns

5 | Excellent
4 | Very Good
3 | Average
2 | Not good
1 | Poor
0 | Don't know

..but populates the table only with the numbers 5, 4, 3, 2, 1, or 0.

Consequently, the legend in my graph only displays the numbers - when I would really like the Words.

What's the best way round this?

NoVoice

View 1 Replies View Related

Best Practice: Multiple Values

Feb 25, 2008

Hi All,

I'm a relative newbie to Access - I am wondering the best way to solve a problem. I am the admin for a database used to track projects and the quality control process. With this process we must keep up with the review of another database, the pieces of information entered which are erroneous and when the individual responsible corrects the data. To date, the errors have been manually typed into a memo field which is then pushed out to the end user in a report. The errors are very consistent and I want to create functionality that will allow me to select the errors (there are approximately 50 standard errors) from a list or using a button or whatever is wisest. Basically, I would love some best practice opinion here as I am totally stymied at this point.

Any advice for a weary admin?

View 14 Replies View Related

Multiple Practice Groups For One Person

May 27, 2005

Hello,

I'm creating a simple relational database of all the attorneys our company work with. I'd like to have three tables: "Law Firms" (firm name & other info), "Attorneys" (what firm, personal info, and what practice groups s/he is involved in), and lastly "Practice Areas" (all different practice areas with codes).

Now, my issue is that people are usually involved in multiple practice areas. Thus, I can't just put a code for one practice area in "Attorneys" table, but I can't put multiple codes in either in one field (right?) because it'd mess up the relations.

What I'd like to accomplish is for people to be able to go to our intranet and, using a form (?), select a law firm and a practice group and get a list of attorneys.

Does anyone know of a good way to solve this? It doesn't have to be pretty, since the DB isn't going to be huge (2000-2500 records).

Thank you!

View 3 Replies View Related

How To Create A Template For A Medical Practice

Oct 26, 2012

I am just wondering if theres a way I can create a customise database for my workplace. We are looking at replacing the old record cards that sit on the desk that records each clients visit and the price they paid. We do use MYOB for all our accounting etc but we are wondering if there is a way that we can create a database that enables us to record the date and price paid for each visit for every individual client?

View 4 Replies View Related

Best Practice To Handle Poor Data Quality In Relationships?

Jul 21, 2007

I'm attempting to normalize an enormous table with order data, but I'm running into some problems. The table currently contains many duplicates, of which also included the actual order information (yikes!), but I managed to normalize it almost all the way down. It appears that different accounts can be used on orders, and these order numbers are being recycled for some reason months down the line (don't ask my why they're reusing them for future orders because I have no idea either, they should be creating new order numbers). Of course, the Order number is the primary key in my table as it should be. I guess the same thing can occur with the sales rep. Anyway, I'm struggling to find the "best practice way" to deal with this situation. I'm almost tempted to create an intermediary "transaction table" or something like that between the main general order information (which at this point will basically be the Order Number and Customer ID only), then include a table with the account information and sales rep info, then have that link to the Order Detail with the products, quantity, order number and various dates for those order numbers. Order maybe it should be a separate, related table, but not between the general order information and the order details? Can anyone tell me if I'm on the right track for this situation? It was a total curveball that the rep and account information could be different on these orders.

Option 1:
Order (Order #, Customer) -> Transaction Information (Order #, Account Type, Sales Person) -> Order Details (dates, products, quantities, etc)

Option 2:
Order (Order #, Customer)---> Transaction Information (Order #, Account
| Type, Sales Person)
|
|-> Order Details (dates, products, quantities, etc)

View 2 Replies View Related

Modules & VBA :: Trimming White-space After Pulling Data From Excel Cell?

Apr 15, 2014

I've got a piece of VBA scripting which runs as an event linked to a button on my MS Access form.

I maintain a database of members of staff at my organisation. It's pretty outdated...

I'm basically wanting to pull in their updated data (extracted from on our payroll system) from a spreadsheet, into a form, when clicking a button on a particular person's record.

This is what I have so far.

Code:
start = Forms!frm_main2!txt_start_row.Value - 1
conv = DDEInitiate("EXCEL", "Staff List.xlsx")
cell_employee_number = "R" & start & "C1"
cell_surname = "R" & start & "C2"

[Code] ....

The function "CStr(DDERequest())" converts the cell number into the readable data, however I seem to have whitespace below the value.

What would I need to do to strip out this whitespace? Would I use strtrim? If so, I am unsure of the syntax... how would I incorporate strtrim into the above?

View 7 Replies View Related

Computer Disposal Best Practice: Table To Store Retired Hardware?

Jun 27, 2007

Hi guys. I have been working on a database to store network information, computers, software etc......

I have a table (tblComputers). I allocate computers to users on the network.

My question. When they come to the end of their shelf life I have the option to delete them from the database. However once deleted I will have no record of them. So I thought......would it be better to create a seperate table and move them there, or add an additional check box within tblComputers 'Retired' then add some code to prevent allocation?

Advice warmly received as always.
Phil.

View 2 Replies View Related

Field Size

Jun 9, 2005

I have a query that consists of three fields. This query is then placed in a form. I would like to set the physical length of my fields because one field consists of 4 digit numbers (I want the size of this to be relatively small) and the other two field consist of categories (field that need more space so that the user may see each letter of the category) Please help.

View 1 Replies View Related

Field Size

Jun 9, 2005

I have a query that consists of three fields. This query is then placed in a form. I would like to set the physical length of my fields because one field consists of 4 digit numbers (I want the size of this to be relatively small) and the other two field consist of categories (field that need more space so that the user may see each letter of the category) Please help.

View 2 Replies View Related

Field Size

Jan 21, 2005

I've done some searches on this, and wasn't able to find an answer--just a hint that this isn't possible. So, I'm asking to be sure.

I know there is a limit to field size at 255--but is there ANY way around that?? I'm transferring a file where some fields have a lot of information, usually not more than 255, but what's there HAS to be there.

If there's no way around it, I'll just have to make an overflow field and move them manually. There have been too many changes made to the table already to start from scratch.

Can I just state... for the record.. that 255 is a stupid limit. It's stupid to HAVE a limit.. it's like Gates saying that we'll never need more then 24 or 500k or whatever the number was.

Thanks,
Siena

View 4 Replies View Related

Text Field Size

Jul 29, 2005

Is there any way of increasing a text field size to above 255?

View 3 Replies View Related

Cannot Change Field Size

Jul 13, 2005

Hi.
I have a main table (with other tables related to it).
It has the 255 max number of fields. (I know... But bear with me.)

ANyway, I need to change some field's size to smaller sizes. But if I try to change them, even 1 at a time, I get the cannot do because I have too many fields defined.

Ideas???

Russ

View 2 Replies View Related

Text Field Size

Jul 11, 2007

MS documentation states that space is not reserved for unused characters in a text field. Does this mean that there is no storage penaly for having a text field 255 as opposed to 80.

On a more general note are there any tools to help calculate the size of a table?

View 4 Replies View Related

Limiting Size Of A Field

Aug 14, 2013

Im doing a coursework on ms access on School Management System. I have a table 'tblSubject' containing fields: 'Subject ID' and 'Subject Name' . A student has the right only to choose a maximum of 8 subjects, that is , the field 'Subject ID' must have only 8 records/entries. How to do this ???????

View 1 Replies View Related

Type Text Field Size

Oct 2, 2006

Hi,

I have searched on this and it says: it doesn't matter as long as it's of type text. It matter if it's long integer..etc. I am not quite sure.

I wonder if default size '50 of fields' of type text occupies that size in memory even though the data in the field is not 50 chars.

Regards,
B

View 2 Replies View Related

Tables :: Increase Field Size From 10 To 50

Dec 25, 2012

How to increase field size in a certain table from 10 to 50 from Database (programaticaly).

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved