Link to home
Create AccountLog in
Avatar of Bill_E
Bill_E

asked on

How to scroll a text box programmatically and how to get handles for controls on forms in Access...

I am trying to scroll a text box via code and am having problems getting the text box handle:

dim hd as long
hd = text1.hwnd

Returns an error that 'Object doesn't support the Property or Method'.  

Various internet sites suggest that in VB something like:

SendMessage(Text1.hWnd, EM_LINESCROLL, 0, 5&)

should work but in VBA I can't get hwnd returns on any controls on an Access form, 2003 or 2007.  Any suggestions??? Thanks!

 
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account