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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames? 1

Status
Not open for further replies.

bdfigler

Programmer
Oct 12, 2001
58
US
Is there a feature in VB that works like Access's subform? I am creating a "wizard" and I want to display a series of checkboxes on the left side of the screen that shows the user's progress. Of course, this (as well as the 'next', 'back' buttons, etc.) would be constant from form to form. I am relatively new to VB so if someone could point me in the right direction I would appreciate. -Brad
 
Use a set of Frame Controls that all occupy the same Left/ Top. Put your "common controls" on the form, to the left. Use ZORDER or .VISBLE to show the frame you want. Place controls that belong to a particular page ON the frame.
At design-time, right-click on frame and press Send To Back / Send To Frint to get to the other frames. You could "offset" them at design-time, put a "placeHolder" invisible label at the Left/Top where the frames should be and at run-time and adjust the frames in the Load Event. At run time you can move controls between frames if you like by
Set ctlname.Container = framewhatever Compare Code (Text)
Generate Sort in VB or VBScript
 
Sounds like the best idea. I was thinking about programmatically creating the controls each time the user clicks 'next'. For curiosity's sake, is that possible (e.g., to programmatically create a text box)? Thanks for the help, John. -Brad
 
Must have one of every control to be created. Set INDEX=0 at design-time (can't do at run-time). All have same events with (Index a Integer) argument passed.

Dim I as long
I = txtbox.Ubound + 1 ' use next number
Load txtbox(I) ' Voila
txtbox(I).Left = ...
txtbox(I).Top = ...

Carful. Index does not have to be succesive i.e. 0,1,2,3. They could be 0,4,7,16...because of individual Unloads.
Index is never renumbered.
To Unload
'
For I = txtbox.Ubound to 1 step -1' do not unload 0
on error resume next ' txtbox(I) might be gone if deleted
unload txtbox(I)
on error goto 0
Next



Compare Code (Text)
Generate Sort in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top