if -then by form page

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
 
G

Graham R Seach

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
 

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