Set Character Limit in Long Text Fields

Опубликовано: 22 Март 2026
на канале: Isladogs On Access
5,318
22

This follows on from an earlier video Prevent Copy & Paste in Access forms:    • Prevent Copy & Paste in Access Forms  .

This video shows how the number of characters in long text fields can be limited using VBA code. It also demonstrates the use of dictation for entering text in Access and code to check spelling (both of these work well with long text fields).

The example database with all required code can be downloaded from accompanying article is available on my website: https://www.isladogs.co.uk/set-charac...

TIMES:
0:00 Intro
0:20 Short text fields - size specified in table design - maximum 255 characters
0:32 Long text (memo) fields - up to 65,536 characters ...or more programmatically
0:55 Cannot limit number of characters in table design ...use code to do so
1:06 Example database with Notes (long text) field limited to 500 characters
1:37 As text entered, number of characters remaining drops ...until it reaches 0
1:52 As above but pasting text. When character limit reached, message shown & data entry halts
2:21 Use of dictation mode - Windows key + H
3:01 Attempt to paste more than 500 characters is blocked (usually) ...
3:15 Safer to prevent pasting into Access - use KeyPreview =Yes & code in Form...KeyDown event
4:15 Explanation of code used
5:20 Use of 2 APIs
5:43 Use of spell checker code
6:23 Summary
6:53 Thanks for watching