473,395 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Form on Form - Modal to Use or Not

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
5 10013
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
"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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop:...
2
by: Matt | last post by:
I want to know how to submit the form data to a modal dialog window? The following is page1.asp, and when the user clicks submit button, it will post the form data to page2.asp by opening a new...
4
by: Kyralessa | last post by:
In Access 2000, I have a base form with a ListBox of conference registrants. In the form's declarations section I include Dim f as Form To add a registrant I'm doing this: Set f = New...
4
by: Paul Aspinall | last post by:
Can anyone advise how to display a form on top, and modal, without using ShowDialog?? Thanks
11
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok /...
1
by: Frank Rizzo | last post by:
I am not grokking the difference between Form.ShowDialog() and Form.ShowDialog(this). I have a form (parent form) that kicks off a modal dialog using Form.ShowDialog(). The modal dialog has a 3rd...
1
by: samentu | last post by:
Hi there. I'm having a little problem here with some forms. Let me describe the problem: my application has a MDI parent form (the form that starts with the application); then when I click a button...
11
by: thatguyNYC | last post by:
This is a complicated one... I have a modal form that lets the user preview some text, then either click Submit or Close. This form is called from several other forms. What I would like, since...
4
by: =?Utf-8?B?Z2luYWNyZXNzZQ==?= | last post by:
I am trying to close/dispose multiple instances of a form but because they are modal and hidden, they do not show up in My.Application.OpenForms. They must be modal, so making them modeless is not...
1
by: Mohit | last post by:
Hi all, I am working on a windows based client server application with multiple forms. All forms are having custom title bars with no default bars. There is one main form. Some forms are opened up...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.