We help IT Professionals succeed at work.

Continous form with a subform?  Outline form

ClaudeWalker
ClaudeWalker asked
on
462 Views
Last Modified: 2013-11-28
I want to have a form in an outline type entry.  It would look like an outline

Administrative Costs    <------parent form record 1
     wages
     fringe      <----- would be in a subform
     offsite
Payroll Taxes   < ----- parent form record 2
    Salaries
    Office  <------subform again
(all would be displayed on the screen at the same time)

If I put two data sheets together I can get it to a semblance of what I want although it starts minimized (with the little plus sign) and when all are maximized it looks like an outline (but not pretty or user friendly).

Is this possible????

Let me know if you need more clarity.

Thanks, JOe K.    
Comment
Watch Question

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
Well ... before everyone says it can't be done ("Continous form with a subform") ... here is how you do it:


OK ... first ... yes, it can be done ... been doing it for years.
Just note that you won't be able to put a continuous (sub)form in the Detail Section of another Continuous form ... but, you can ... after the stupid error  ... do it, as such:

ok ... Set your main form's Default View to Continuous ...
Drag a Continuous subform into the Header or the Footer of your main continuous form.
You will get the error message:

"A form with a subform object can't have its Default View set to Continuous Forms."s
 ...and Access will RESET the main form's Default View to Single Form.
 
Now do this - in the exact order shown:

1) CUT ... (control X) the subform off of the main form.
2) Set the Main form's Default View back to Continuous Forms now.
3) PASTE the subform back onto the main ... and you s/b good to go.
4) Save your main form (with subform).

I've done this many, many times ... since Access 2.0
No clue why M$ does not 'allow' this?

Then ... you can repeat 1-4 for more 'continuous'  subforms ... again ... only in the Header and/or Footer, not the Detail section.

Note ... You can ... drag a continuous subform into the Detail section of the main form ... and go through steps 1-4 ...but, when you open your main form ... you will get that same message again ... and the main form's Default View will be reset back to Single Form. I have not found a way around this .. BUT ... really, you WANT the main form to be Continuous ... so, the Detail section needs to be available anyway, so this is not really a problem.

mx

Author

Commented:
So you can't have a continuous form in the details section of a continuous form?

Commented:
Interesting approach DbMX.....I just learned something new and thanks.

ClaudeWalker - Let us know if DbMX's suggestion works.
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
"So you can't have a continuous form in the details section of a continuous form?"

No. You can actually insert one in design view ... but, when you open in form view ...you get an error message.

Trust me ... the approach does work.  I use it in almost every app.

mx

Author

Commented:
I had my form like dbmx said before the question that and I appreciate the advice.  A continuous with in a single.  I wanted a continuous within continuous.  I have no idea why that is not possible but access doesn't allow it.  It looks okay with a continuous and a continuous in the footer but it doesn't make sense in my application of data entry.  

I wanted a continuous withing continuous.

Like
record1
   subform data
        1
        2
        3
record 2
        4
        5

all on the screen at once.

with the method above. you have to click on a record in the parent form to get the form in the footer to change its data

so it looks like this
parent form
1
2
3
      subform in foot
1
2
3

and if you clicked on record 2 in the detail section

the subform footer would be
4
5
 
it works great for some applications just not if you need to see all of the data on the screen at the same time.

I used this technique in a tool inventory. Every tool you clicked on you could see the financial data.

Commented:
DbMX: I to learned something here.

ClaudeWalker:  If you do want to show an outline, you may consider using a treeView control from MS Common Control.  But is does require a lot of coding...

Author

Commented:
"No. You can actually insert one in design view ... but, when you open in form view ...you get an error message."


but the error message changes the view back to single form view.  Is there a way to keep in in continuous view with a subform in the details section??

Author

Commented:
treeView control from MS Common Control

what is this?  Dare i ask.

Commented:
It is the control used by Explorer to show the directory structure.  

In a form design mode, select Insert>ActiveX Control and, from the list, click on Microsoft TreeView Control v XX  (you should have it as it is a standard Windows control).

It is not a data bound control, so you will have to filled it up yourself, but is is fairly flexible.  To show multiple column, I used a fix font, such as Courrier, and count the spaces the old fashion way.  Not as pretty as Arial, but at least you have the data.

It also has events (such as click event) to allow you to synch a subform with the selected node information if you need.

Commented:
I thought DbMX's idea would have worked. But I now think that you actually may need to look at normalizing your tables. Hate to point you in a different direction but I tend to think that well normalized tables help make creating forms easier. So, can you show us the tables and their relationships?
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
"Is there a way to keep in in continuous view with a subform in the details section??"

No.  That is the on case that will not work.  And when you think about it ... it really doesn't make much sense.

" I wanted a continuous within continuous. "

You can ... except ... the 2nd continuous form cannot be in the Detail section of the main continuous form.



mx

Author

Commented:
I will paste a pic of the relationships.  I pretty sure it is normalized.
Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
"Of course, that is two completely separate subjects that are not directly related (cont form on cont form) .."


DbMX - Maybe I mis-understood something here. I thought your first suggestion was to help with cont form on cont form. Assuming that was right, then I thought the problem might have been with the relationships.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.