How to Set Field Length in a MS Access 2003 Query
When you create an Access database, the component that retrieves data from tables is the query. Tables are used to hold data in the database, but queries are the components used in reporting and webpage design. To return a specific character length in a query, the Left() function is used. This is helpful when you want to truncate data after a specified length in a report.
Instructions
-
-
1
Double-click the file you want to open. When the main Access database menu is displayed, click the "Queries" button. This opens a list of queries programmed in the database.
-
2
Right-click the query you want to edit and select "Design View." This opens the query in a design viewer that you can use to edit the length of fields.
-
-
3
Type "left([field_name], <length>)" into the text box at the bottom of the screen. Replace "field_name" with the name of the field you want to set. The "<length>" is the parameter that sets the query field's length.
-
4
Click the "Save" button and close the design viewer. Double-click the query to run it and test the changes. In your query results, you see that the field now returns the specified amount of characters.
-
1