473,797 Members | 3,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A97: Simplest way to limit unbound textbox to 200-chars entered MAX

MLH
Can I somehow set a max length of chars entered
into an unbound textbox control?
Feb 13 '06
12 2473
Randy Harris wrote:
Private Sub Notes_memo_Afte rUpdate()
Me.Notes_memo = Left(Me.Notes_m emo, 200)
End Sub

Private Sub Notes_memo_KeyP ress(KeyAscii As Integer)
If Len(Me.Notes_me mo.Text) > 200 Then
If KeyAscii > 31 Then KeyAscii = 0
End If
End Sub

I use this belt/suspenders approach in case someone does a copy/paste into
the control.


Excellent idea. I think I need to add the AfterUpdate suspenders to
what I have to ensure my backside stays covered when the belt breaking
copy/paste occurs.

James A. Fortune
CD********@Fort uneJames.com

Feb 14 '06 #11
MLH wrote:
Had already tried that. Presented its own twists 'n turns.
Using something like &x200;;" " - the user finds his insertion
point at the END of all 200 spaces. Wouldn't be so bad if I
could make that insertion point somehow sit at the BEGINNING
of all those spaces. Haven't quite figured that one out yet.


Sorry, Instead of the underscore character use the "a" character instead:

a;;

Substitute "a" 200 times.
--
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Feb 14 '06 #12
MLH
I don't know how you figured it out, but that's perfect.
It just does the job. No annoying messages are needed.
Once the 200th char is entered, user hits a brick wall.
That's message enough for most folks.

Thx, MGFoster.
Feb 15 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1726
by: Earthling | last post by:
Dear Access Programmers, I can't seem to figure this out. The text boxes that are used to input data via my form are unbound, I want to restrict the user to only put input that is one line. Eg.
1
1966
by: Trevor Best | last post by:
When did this change? I thought is was 64K but I managed to dump 18MB in one, Access crashed when I scrolled to the bottom (out of memory error then sent report to MS). Out of interest, does anyone what a reasonable limit is? i.e. how much text can be dumped and scrolled without crashing. -- Pretentious? Moi?
2
2420
by: MLH | last post by:
What's the simplest way to allow a user of an A97 app to change password?
4
1933
by: Bill Stock | last post by:
The few times in the past that I've loaded unbound data, I've tended to cheat and use temp tables (not really unbound) or use code for small datasets. I'm currently involved in a project that has numerous tables in the 200 column range, with several thousand rows of data. A consulting review prior to my involvement stressed the wasted space and database speed as the major impetus for normalization. Although the db actually works fairly...
1
1141
by: Tim::.. | last post by:
Hi... Can someone please tell me the simplest solution to create an update page for a menu I have on an asp.net website... Basiclly I have 10 menu and 10 price fields that change every day! I want to stor the information in an SQL Database and have created a very simple table with with the following fields: menuID
10
1680
by: Arno R | last post by:
Hi all, I have a database that I need to use in different versions of Access. This is A97 in most places and A2k in a few other locations. (I develop in A97 and convert the db to A2k for these other locations) FYI: I am using A97 as backend for both versions. No problem. After conversion A97 > A2k everything (seems to) work(s) just fine, except for one thing I only discovered today. Using an unbound form to collect data that is used in...
0
3014
by: colleen1980 | last post by:
Hi: There are two textboxs in my main form. One is bound and another is unbound. There is no entry in the unbound textbox as values come into automatically after entering some information in the subform. My question is how to i pass values from unbound textbox to bound textbox every time when the value change in unbound textbox i need to change the value in the bound textbox. When the form load there is already value in the bound textbox...
3
11279
by: Richard | last post by:
How is the result of query placed in a unbound textbox ? Suppose CriteriaLookups has columns TableName, KeyColumn, KeyValue, DataColumn Foo,x,11,xhat Bar,z,3,xyzzy And
1
15196
by: dpark29 | last post by:
Access 2000 - If a textbox control is bound to a hyperlink field in an Access database table, the textbox appears formatted as hyperlink and when the user right-clicks the field, the Hyperlink option is available on the resulting popup Shortcut Menu form. I am developing a form that uses unbound textboxes, and I need to include a textbox that will contain a hyperlink. How do I get an unbound textbox to act like a textbox that is bound to a...
8
3874
by: crazyhouse | last post by:
I want to use temporary information from an unbound textbox, but i cant seem to run any code on an unbound textbox. Is this possible. I have it working with a bound "control" but cant seem to make it work with an unbound control.
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9536
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10205
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9063
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7559
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.