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

Get back to top left hand corner of main form (with subforms) when moving between records

Status
Not open for further replies.

MrMode

Technical User
Aug 28, 2003
195
GB
I have a form with 2 subforms within it.

The subforms are beyond the page width (not ideal) which means after working with them, the main form cannot be clearly seen.

What I need is for the screen to reposition itself to the top left hand corner when the user navigates between records whether they have interacted with the sub forms or not.

I cannot figure out what event to use to return the user to the main form and re-position it.

Any help most appreciated.
 
Also, I am getting a bit mixed up with syntax.

Is below the correct to reference a listbox on a subform in the VB for the main form? I am looking at OnCurrent events to see if I can solve the issue above, but keep being given error messages "...cannot find..." and am assuming my syntax is incorrect.

Forms!MainForm!SubForm.Form!Listbox18

 
Solved it.

I put a text box in the top left hand corner of the main form, then moved the cursor to the first field on the form that a user should use.

Code:
Private Sub Form_Current()

'Go to the Main form

Forms.MainForm.Form.Text63.SetFocus
Forms.MainForm.Form.Refresh
DoCmd.GoToControl ("RecordName")


End Sub

It is cluncky, but seems to work.

Any better suggestions are most welcome.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top