if -then by form page

  • Thread starter Thread starter embry
  • Start date Start date
E

embry

I have a multiple page form that shows only one page at a
time. -determined by multiple CommandButtons, OnClick
goto page Event Procedures.

How could I write an if\then statement to pull a field
from a table into a textbox control based on what page
the form is on. In other words:
IF form is on page1 THEN pull field1 from table1 into
textbox control1

THANK YOU
 
Embry,

You're better to use a Select Case...End Select construct, and separate the
code you use to get the data into separate procedures.

Select Case intPageNo
Case 1
LoadPage1Stuff
Case 2
LoadPage2Stuff
Case 3
LoadPage3Stuff
End Select

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
Back
Top