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!

Access 2000 - Multi-Paged Form Problem

Status
Not open for further replies.

cascot

Programmer
Jan 30, 2002
127
CA
I have an application originally designed in Access 97 which I recently converted to Access 2000. Some forms have two pages using a pagebreak. Everything worked as expected in Access 97, however since converting to 2000 there now seems to be a problem related to the use of [ObjectName].SetFocus

On clicking the Update button I carry out validation to ensure certain fields contains values. if they do not I display a messagebox, set the focus to the appropriate object then exit the sub procedure. Within Access 2000 it now seems that, even though I am solidly on (say) page 2 (as are the objects I am validating) setting the focus to any of these objects now messes up the pages. I end up with page 2 covering only the bottom 25% of the screen with the other 75% taken up by the lower sections of page 1.

I can get around the problem by ensuring that before exiting any code within which an [ObjectName].SetFocus has been executed, I do a Me.GoToPage 2 (say). The problem is that it requires many such instances where nothing was required under Access 97 and it causes the form to flicker slightly (using DoCmd.Echo False/True doesn't help)

Has anyone come across this problem before? Any suggestions anyone?
 
I don't recall how the multipage works. I do remember, however that I ended up changing it to multiple tabs on a tab control. Worked much better.
 
hneal98,

Thanks for your reply. Unfortunately this is a system that has been used in anger for many years and I do not have the option of being able to amend the user interface to that extent just because of the upgrade to Access 2000.
 
May be you can add another simple lines on each of the controls to go to the page
Code:
Private Sub Text1_GotFocus()
    DoCmd.GoToPage (2)
End Sub
'------------------------------
Private Sub Text8_GotFocus()
    DoCmd.GoToPage (3)
End Sub

________________________________________________________
Zameer Abdulla
Help to find Missing people
Do not cut down the tree that gives you shade.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top