Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a Continuous Form and Position Cursor Over Several Columns

Status
Not open for further replies.
May 7, 1999
130
US
Hi!

Is there a simple way to open a continuous form laid out like a datasheet and position the cursor several columns to the right or, better yet (and assuming a wide form) so that column "x" which would normally be beyond the right-hand side of the screen could show up on the left? E.g., if there are 25 columns on the form where 1-10 are visible within the borders of the screen and 11-25 are off to the right that I could "magically" open the form and slide the horizontal scroll bar so that column 11 lines up at the left-hand side of the screen and now columns 11-x are visible on the screen and x+1 to 25 are off the screen to the right.

Hope this is clear.

Thanks!

John Harkins
 
I'm not sure how you would control the horizontal scroll bar, but you can set the cursor at the field of your choice with:

object.setfocus

If you can't figure out how to control the scroll bar, then you might want to play around with the visible properties of the objects.

e.g. me.textboxname.visible = false
 
Sure! In your form's OnOpen event, add an Event Procedure that does the following:

Me("fieldname").SetFocus

where fieldname is the name of the column within your datasheet that you want to move the cursor to. Make sure you keep the double-quotes around the fieldname!

[shadeshappy] Cruising the Information Superhighway
(your mileage may vary)
 
Well, folks, I used the

me("fieldname').setfocus

method and first moved to a place at the far right of the form and followed that statement immediately with another setfocus referencing the one I wanted on at the far left. Bingo; it worked. Now, it could be there's a much smarter way to do it.

Thanks!

John Harkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top