Using Multipages in a Form
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 |
Using Multipages in a Form
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 "Azza" wrote in message m... 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 |
All times are GMT +1. The time now is 09:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com