From: Phillip on 5 Feb 2010 13:04 Hi, I have a form with a text box that gets data from a memo field in a table. As the user enters data in the text box I want the input to be restricted to the size of the text box. Right now as the user types, once the box is full the data scrolls up. Is there a way to make input stop once the box is full? Thanks in advance, Phil
From: Arvin Meyer [MVP] on 5 Feb 2010 14:00 Without a fixed width font like Courier New, you really can't easily tell when the textbox is full. If you use a fixed font, you might try something like this (aircode): Private Sub txtMyMemo_Change() ' 150 or whatever the number of characters you want If Len(Me.txtMyMemo) >= 150 Then MsgBox "Too many characters" vbOKOnly End If End Sub My question to you is, if you want to limit the number of characters, why not use a text field instead of a memo field? -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Phillip" <Phillip(a)discussions.microsoft.com> wrote in message news:6D8CB192-9883-41D8-8ED7-E3F225881FB4(a)microsoft.com... > Hi, > I have a form with a text box that gets data from a memo field in a table. > As the user enters data in the text box I want the input to be restricted > to > the size of the text box. Right now as the user types, once the box is > full > the data scrolls up. Is there a way to make input stop once the box is > full? > Thanks in advance, > Phil
From: John W. Vinson on 5 Feb 2010 16:51 On Fri, 5 Feb 2010 10:04:01 -0800, Phillip <Phillip(a)discussions.microsoft.com> wrote: >I want the input to be restricted to >the size of the text box Ummmm... Why? If there's a scrollbar on the textbox they can see it all. If you're printing a Report you can set the textbox's Can Grow property to show all the data. -- John W. Vinson [MVP]
|
Pages: 1 Prev: checking to see if an mdb file is currently open Next: match case |