Form Design

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with three sections (main, and two optional sections) but i
only need to fill out the main section and one of the other sections
depending on the situaion. Is there a way to set up the form to only activate
the optional sections only when i need it? Maybe a checkbox that activates
the section when it is selected? Please help!

Thanks...
 
Ray

Hi from London UK!

One possibility is this: set up the two optional parts on separate pages of
a tabbed control. (Depending on the number of fields you might also put the
'standard' content on the first page, with the rest as pages 2 & 3). In the
form design, set the 'visible' property of both the optional sections to
False. Then, on the control (or controls) whose values determine whether
'part A' or 'Part B' apply, set up some coding so that, once all the
information is there to decide, it sets the visible property of the relevant
tabbed page to True.

Also add some coding so that when you move to another record it re-evaluates
wheter A or B should be visible (for an existing record) or sets both to not
visible if it's for a new record.

Does this help? Please let me know.

All the best.
 
I have a form with three sections (main, and two optional sections) but i
only need to fill out the main section and one of the other sections
depending on the situaion. Is there a way to set up the form to only activate
the optional sections only when i need it? Maybe a checkbox that activates
the section when it is selected? Please help!

Thanks...

One way to do this is to use a Tab Control with three pages, one for
your generic data and the other two for the optional sections. You can
use code in the form (the Current event, or some other appropriate
event in which you can determine whether the other sections are
needed) to make the specific tab page visible or invisible.

John W. Vinson[MVP]
 
Hey Doogle

Thanks for responding.

I thought of that but my dilema is the form is to be used for reviews and it
will calculate a score up to 100% and the requirment for form is that it
start at 100% and points are decuted. So i need a way to exclude a section
from the overall score if it does not apply. Any suggestions?

Thanks
 
Hello again!

Nice to see an MVP (Most Valuable Player? Microsoft Valued Person? ???) sent
you a similar response to mine!

Yes, I think this will still work. What you'll need to do is create a
function to calculate the score. The structure would be something like this:

'Calculate score based on main form only:
.....
.....
MainFormScore = XXX
'Then calculate score adjustments (no matter whether they're added on or
'subtracted, the logic is similar, just the sign is different!
If forms!<formname>!<optionalpage1name>.Visible = true then
'now do the calculations based on the first optional page
...
...
OptionalPageScore = YYY
Else If forms!<formname>!<optionalpage2name>.visible = true then
'now do the same for the other optional page
...
...
OptionalPageScore=YYY
End If

TotalScore = MainFormScore + OptionalPageScore

Then set the value of the totalcore on the form to the function you've just
created.

Does this help?

All the best
 
Back
Top