zoom command

L

lilbit27

I am using this DoCmd.RunCommand acCmdZoomBox to open a zoom box on a
textbox. is there a way to prevent the text from being highlighted
when you click on the box.
 
M

missinglinq via AccessMonster.com

I'll be most interested to see if anyone has an answer to this; I've been
trying to figure it out for a while now. I finally gave up and "rolled my own!
" It requires placing a large text box (call it ZBox) on your form. Assign it
the same Control Source as the field you want to expand, and make it visible
by double clicking the field you want expanded.

Substitute the actual name of your field to be expanded for YourFieldName.

Private Sub Form_Load()
'Make the textbox invisible on loading the form
ZBox.Visible = False
End Sub


Private Sub YourTextBox_DblClick(Cancel As Integer)
'When you double click the field, this make the ZBox
'visible and moves the cursor to the beginning to
'deselct the text
ZBox.Visible = True
ZBox.SetFocus
ZBox.SelStart = 0
End Sub

Private Sub ZBox_DblClick(Cancel As Integer)
'Double click the ZBox to close it and
'return to your original field
Me.YourTextBox.SetFocus
ZBox.Visible = False
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top