- In this video, you’ll learn the basics of formatting forms in Access 2016. Visit for our text-bas.
- I know how to generally change row height and field width in an Access 2010 table or query. But in cases where one record might have more notes in a field than another record, we want to have the cell wrap the text and automatically change the cell height.
3 Answers
I would put this into a standard module, not into the form module.
Not the answer you're looking for? Browse other questions tagged formsvbams-access or ask your own question.
Short Text and Long Text fields (also called Memo) are perhaps the most commonly used Data Types. With text formatting you have two choices: keep the default formats or create a custom format. When you apply a format to a table field, that same format is automatically applied to any form or report control that you subsequently bind to that table field. Formatting only changes how the data is displayed and does not affect how the data is stored or how users enter data.
In this article
Overview of text formats
The Short Text and Long Text (also called Memo) data types do not have predefined formats. The Short Text data type has only custom formats. The Long Text data type has both custom and Rich Text formatting. If you don't specify a format, Access left aligns all text in datasheets.
Typically, you apply custom formats to Short Text and Long Text data types to make the table data easier to read. For example, if you use a form to collect credit card numbers, and you store those numbers without spaces, you can use a custom format to add the appropriate spaces to make the credit card numbers easier to read.
Custom formats for Text fields can have up to two sections. Each section contains the format specification for different data in a field.
Section | Description |
---|---|
First | Format for fields with text. |
Second | Format for fields with zero-length strings and Null values. |
For example, if you have a text boxcontrol in which you want the word 'None' to appear when there is no string in the field, you could type the custom format @;'None' as the control's Format property setting. The @ symbol in the first section causes the text from the field to be displayed and the second section causes the word 'None' to appear when there is a zero-length string or Null value in the field.
Access For Mac Trial
You can use the Format function to return one value for a zero-length string and another for a Null value
To control the format in which data is entered, see Control data entry formats with input masks. To enhance plain text in a Long Text Data Type, see Add a rich text field.
Access For Mac Free Trial
Apply a custom format
- Open the table in Design View.
- In the upper section of the design grid, select the Date/Time field you want to format.Top 5 Text Editors for Mac. Text editing is a very important part of a developer’s life. This is even more significant for Mac developers, who are accustomed to a captivating environment. For them, there is a good selection of software. Here below, is a description of five top text editors for Mac. Unlike PCs, which require manual maintenance to clear temporary file caches, the Mac's UNIX-based operating system is designed to automatically run maintenance and clear temporary files. https://newchatter487.weebly.com/mac-editor-for-temporary-text-files.html. Once we have changed these settings in Preferences, we can save files in the plain text (.txt) format. Let’s try it out. Launch TextEdit, and create a New Document. Type some text into this document. Since we want to save a plain text file, we will not format the text in any way. Now, go to “File -> Save“, or press “command + S“. Best Text Editors for macOS. Note: In this article, we are focusing on the best text editors for coding but if you are looking for a text editor for your writing purposes, you can check out our article on the best writing apps for Mac. Sublime Text 3. Sublime Text is probably one of the most famous text editors available for Mac and for all the right reasons.
- In the Field Properties section, select the General tab, click the cell next to the Format box and enter the specific characters based on your formatting needs.
- After you enter a format, the Property Update Options button appears and lets you apply the format to any other table fields and form controls that would logically inherit it. To apply your changes throughout the database, click the smart tag, and then click Update Format everywhere <Field Name> is used. In this case, Field Name is the name of your Text field.
- If you choose to apply your changes to the entire database, the Update Properties dialog box appears and displays the forms and other objects that will inherit the new format. Click Yes to apply the format.For more information, see Propagate a field property.
- Save your changes, and then switch to Datasheet view to see whether the format meets your needs.
- Test your custom text formatting in the following ways:
- Enter uppercase or lowercase values, and see how the format treats the data.
- Enter a zero-length string or a null value, and see if you like the result.
Examples of custom formats
The following are examples of custom text formats.
Setting | Data | Display |
---|---|---|
@@@-@@-@@@@ | 465043799 | 465-04-3799 |
@@@@@@@@@ | 465-04-3799 465043799 | 465-04-3799 465043799 |
> | davolio DAVOLIO Davolio | DAVOLIO DAVOLIO DAVOLIO |
< | davolio DAVOLIO Davolio | davolio davolio davolio |
@;'Unknown' | Null value | Unknown |
Zero-length string | Unknown | |
Any text | Same text as entered is displayed |
Microsoft Access For Mac
Custom format characters
To create a custom format, use the following characters as placeholders and separators.