Using Multipages in a Form

A

Azza

Hey all

I have just started using multipages in a form as I have heaps of info
to extract.

The problem is I do not know how to set the focus from one page to the
next.

I have field validations and when they trigger and the multipage is on
another page I get a notinfocus error.

I have these sort of validations:
'Checks if REFERRAL SOURCE is entered
If Me.cbRefSource = "" Then
MsgBox "Please enter the 'Referral Source'", vbInformation,
mboxheader
Me.cbRefSource.SetFocus
Exit Sub
End If

and need to get the form to goto the page first.

Please help - will be appreciated.

Aaron
 
R

Robin Hammond

You need the value property

mpInput.Value = 0
selects the first page.

For readability when using a multipage, I also name each page in the
properties window, and then use something like this

With mpQuery
If .Value = .pgCompanies.Index Then
'do something
End If
End With

Robin Hammond
www.enhanceddatasystems.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top