|
-
May 18th, 2013, 12:35 PM
#1
Thread Starter
Frenzied Member
Dilemma with Using a Form and textbox with Access
I think this is the right forum since the question is db related really.
I had to build this app in Access, because that is the only thing I'm allowed to code in at the office.
I created a form and put some labels and textboxes on it. One box is txtNotes, where I put notes on particular records (yes they are coming from the db, but the question is more about the object). Initially, I wanted to have a vertical scrollbar on this large text box, so that when the note was too large, the user could scroll down. I found that on the Access Form, the textbox has to have focus to show the scrollbar. That was fine. I set focus to it as the last step each time.
Then I encountered a new issue. I was using txtNotes.Text = RS("notes") and eventually, one of my notes was too long and I got an error telling me so. To fix this, I switched from txtNotes.Text to txtNotes.Value. That solved the "too long" problem, but created a new problem. Now when .SetFocus kicks in, the entire contents of the box is highlighted.
So the problem is, if I don't Set Focus, then I don't get scrollbars. If I do set focus, then my text gets highlighted. I could set .Value back to .text, but then some of my notes will be too long. (BTW, what is the limit, I haven't found it anywhere).
So that's it. Suggestions?
I should mention that the text in the box is a mix of English and Chinese, so any ideas that involve counting characters and acting accordingly will be hard to implement with any accuracy.
Thanks.
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|