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!

 
Microsoft Access

Avatar of undefined
Last Comment
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes