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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform continuous form alignment

Status
Not open for further replies.

KirbyWallace

Programmer
Dec 22, 2008
65
US

My first post on tek. ;-)

This ought to be simple. I just don't know the answer.

I have a subform in continuous form mode. When the for requeries (ala, "Me.Detail.Controls("sfsr_Archive").Requery"), the form requeries just fine, but it comes to rest with the right-most column visible on the right hand margin, instead of the left-most column at the left margin.

In other words, I have to drag the horizontal scroll bar back to the left to get column#1 back in view.

I've tried various stabs with ".SetFocus", with no luck.

Anyone know the property or method?

Thanks. I look forward to contributing, too.

Kirby
 
what about something like this ?
With Me.Detail.Controls("sfsr_Archive")
.Requery
.SetFocus
.Form.Controls("name of leftmost control").SetFocus
End With

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I was just coming to report that I had solved it.

It was a matter of "setFocus" after all, I had just used the wrong syntax, or made some other error. What you suggested is what I originally did, and had no luck with.

But I fiddled with it a bit more and it does in fact work, just like you are suggesting.


Either of the following two worked. I have no idea why it seemed like it did not work before, as I tried this syntax once already with no luck. But now it works:

Me.Detail.Controls("sfsr_Archive").Requery
Me.Detail.Controls("sfsr_Archive").Form.Controls("Check_Number").SetFocus

Also works (cause it does the same thing)

Me.Detail.Controls("sfsr_Archive").Requery
Me.Detail.Controls("sfsr_Archive").Form!Check_Number.SetFocus



Thanks,

Kirby
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top