By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,122 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,122 IT Pros & Developers. It's quick & easy.

Form on Form - Modal to Use or Not

P: n/a
Hi all

Ive have a Main Form with Command Buttons down the Left hand side,
that open various forms. Clicking on a button opens a Sub Form which
is moved to take up 3/4s of the right of the main form, so they look
as one form.

1st Problem:
If I set Modal = True in all Forms, and a Sub Form is open, then I
cant access the Command Buttons on the Main Form, which are still
showing, to the left of the Sub Form.

2nd Problem:
If I set Modal = False in all Forms, and a Sub Form is open, when I
click on the Command Buttons on the Main Form, then the Main Form has
Focus, and the Sub Form disappears behind the main Form.

I need to access the Command Buttons on the Main Form behind the Sub
Form, but with the Sub Form still showing.

Any ideas would be appreciated.

Thanks Folks

Have fun

Chris Sydney Australia
Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
One solution would be to set your "Sub Form"'s PopUp property to True and
its Modal property to False.
That way it will stay on top.
Another solution would be to embed your second form as a true subform which
is actually part of the Main Form.

HTH
- Turtle

"ChrisR" <ch***@krisaracomputers.com.au> wrote in message
news:97**************************@posting.google.c om...
Hi all

Ive have a Main Form with Command Buttons down the Left hand side,
that open various forms. Clicking on a button opens a Sub Form which
is moved to take up 3/4s of the right of the main form, so they look
as one form.

1st Problem:
If I set Modal = True in all Forms, and a Sub Form is open, then I
cant access the Command Buttons on the Main Form, which are still
showing, to the left of the Sub Form.

2nd Problem:
If I set Modal = False in all Forms, and a Sub Form is open, when I
click on the Command Buttons on the Main Form, then the Main Form has
Focus, and the Sub Form disappears behind the main Form.

I need to access the Command Buttons on the Main Form behind the Sub
Form, but with the Sub Form still showing.

Any ideas would be appreciated.

Thanks Folks

Have fun

Chris Sydney Australia

Nov 12 '05 #2

P: n/a
"MacDermott" <ma********@nospam.com> wrote in message news:<dN****************@newsread2.news.atl.earthl ink.net>...
One solution would be to set your "Sub Form"'s PopUp property to True and
its Modal property to False.
That way it will stay on top.
Another solution would be to embed your second form as a true subform which
is actually part of the Main Form.

HTH
- Turtle

"ChrisR" <ch***@krisaracomputers.com.au> wrote in message
news:97**************************@posting.google.c om...
Hi all

Ive have a Main Form with Command Buttons down the Left hand side,
that open various forms. Clicking on a button opens a Sub Form which
is moved to take up 3/4s of the right of the main form, so they look
as one form.

1st Problem:
If I set Modal = True in all Forms, and a Sub Form is open, then I
cant access the Command Buttons on the Main Form, which are still
showing, to the left of the Sub Form.

2nd Problem:
If I set Modal = False in all Forms, and a Sub Form is open, when I
click on the Command Buttons on the Main Form, then the Main Form has
Focus, and the Sub Form disappears behind the main Form.

I need to access the Command Buttons on the Main Form behind the Sub
Form, but with the Sub Form still showing.

Any ideas would be appreciated.

Thanks Folks

Have fun

Chris Sydney Australia

Thanks Turtle

The popup property didnt work the the way I wanted the forms to work
together, but using the subforms embeded in the main form works fine
and looks great. But using my subforms embeded in the main form,
causes a few problems:-

1/ Docmd command dosent seem to work properly. eg Docmd.goto newrec
says object is not open.
2/ It says when I refer to the subform, that its not found or open.
This is a problem with all my other command buttons and other coding.

Any help would be appreciated.

Thanks again Turtle.

Chris
Nov 12 '05 #3

P: n/a
1. I believe the syntax is more like this:
DoCmd.GoToRecord ,,acNewRec
You'll notice that the command itself doesn't tell you which form to go
to the new record on.
If the code is running behind the subform, this is rarely a problem, but
if it's running behind the main form, you'll want to make sure that focus is
set to the subform before you run GoToRecord.

2. The subform is not open as a form in its own right; it is not a member
of the Forms collection.
You can refer to it as "the form in the subform control", like this:
Forms!MainForm!SubformControl.Form
In many cases a shorter form will also work.

HTH
- Turtle
The popup property didnt work the the way I wanted the forms to work
together, but using the subforms embeded in the main form works fine
and looks great. But using my subforms embeded in the main form,
causes a few problems:-

1/ Docmd command dosent seem to work properly. eg Docmd.goto newrec
says object is not open.
2/ It says when I refer to the subform, that its not found or open.
This is a problem with all my other command buttons and other coding.

Any help would be appreciated.

Thanks again Turtle.

Chris

Nov 12 '05 #4

P: n/a
"MacDermott" <ma********@nospam.com> wrote in message news:<%2****************@newsread2.news.atl.earthl ink.net>...
1. I believe the syntax is more like this:
DoCmd.GoToRecord ,,acNewRec
You'll notice that the command itself doesn't tell you which form to go
to the new record on.
If the code is running behind the subform, this is rarely a problem, but
if it's running behind the main form, you'll want to make sure that focus is
set to the subform before you run GoToRecord.

2. The subform is not open as a form in its own right; it is not a member
of the Forms collection.
You can refer to it as "the form in the subform control", like this:
Forms!MainForm!SubformControl.Form
In many cases a shorter form will also work.

HTH
- Turtle
Hi Turtle

Thanks again pal for your effort and time. I owe you a couple of beers
if you are ever down this way!

Thanks again
Chris
ch***@krisaracomputers.com.au
The popup property didnt work the the way I wanted the forms to work
together, but using the subforms embeded in the main form works fine
and looks great. But using my subforms embeded in the main form,
causes a few problems:-

1/ Docmd command dosent seem to work properly. eg Docmd.goto newrec
says object is not open.
2/ It says when I refer to the subform, that its not found or open.
This is a problem with all my other command buttons and other coding.

Any help would be appreciated.

Thanks again Turtle.

Chris

Nov 12 '05 #5

P: n/a
Yeah, sure!

I tried to collect once on a promise of "a couple of beers if you've ever
this way" -
somehow the guy was always busy.
Little danger, though, that I'll be down your way in any future I can
forsee...

<BG>
= Turtle

"ChrisR" <ch***@krisaracomputers.com.au> wrote in message
news:97**************************@posting.google.c om...
"MacDermott" <ma********@nospam.com> wrote in message

news:<%2****************@newsread2.news.atl.earthl ink.net>...
1. I believe the syntax is more like this:
DoCmd.GoToRecord ,,acNewRec
You'll notice that the command itself doesn't tell you which form to go to the new record on.
If the code is running behind the subform, this is rarely a problem, but if it's running behind the main form, you'll want to make sure that focus is set to the subform before you run GoToRecord.

2. The subform is not open as a form in its own right; it is not a member of the Forms collection.
You can refer to it as "the form in the subform control", like this: Forms!MainForm!SubformControl.Form
In many cases a shorter form will also work.

HTH
- Turtle

Hi Turtle

Thanks again pal for your effort and time. I owe you a couple of beers
if you are ever down this way!

Thanks again
Chris
ch***@krisaracomputers.com.au

The popup property didnt work the the way I wanted the forms to work
together, but using the subforms embeded in the main form works fine
and looks great. But using my subforms embeded in the main form,
causes a few problems:-

1/ Docmd command dosent seem to work properly. eg Docmd.goto newrec
says object is not open.
2/ It says when I refer to the subform, that its not found or open.
This is a problem with all my other command buttons and other coding.

Any help would be appreciated.

Thanks again Turtle.

Chris

Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.