A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Open Form



 
 
Thread Tools Display Modes
  #11  
Old April 10th, 2008, 05:49 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Open Form

As Klayuu said, in the FormLoad event of FormB use

Docmd.Restore

This will keep the second form from maximizing.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

  #12  
Old April 10th, 2008, 05:50 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Open Form

Sorry, Dave, typing with my glasses off!

Linq Adams wrote:
As Klayuu said, in the FormLoad event of FormB use

Docmd.Restore

This will keep the second form from maximizing.


--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1

  #13  
Old April 10th, 2008, 06:01 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Open Form

NP
I only need my glasses when I want to see g
Or is it you just washed your hands and you can't do a thing with them?
--
Dave Hargis, Microsoft Access MVP


"Linq Adams via AccessMonster.com" wrote:

Sorry, Dave, typing with my glasses off!

Linq Adams wrote:
As Klayuu said, in the FormLoad event of FormB use

Docmd.Restore

This will keep the second form from maximizing.


--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1


  #14  
Old April 10th, 2008, 07:22 PM posted to microsoft.public.access.forms
rml
external usenet poster
 
Posts: 172
Default Open Form

Ok, that kind of works. It does restore form B to its original state but it
makes form A be not maximized. Also, I have form B set as Modal but it lets
you go to form A. If I open form B up by itself, it keeps all the property
settings but when it is opened through form A, it seems to behave very
different.

Any more suggestions?

Thanks.

"Klatuu" wrote:

That is what I posted earlier.
Docmd.Restore will return form B to its saved size.
How are you determining it is not Modal?
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I have form A and on that form I have a command button. When you click the
button it opens form B with the record you were on in form A. Form A has
onload Maximize. When you click the button and form B opens, it is maximized
and does not seem to take the properties I have set on it. Modal, etc...

If I open the form B by itself, it works fine.

Does that make more sense?

Thanks.

"Klatuu" wrote:

To stay what?
Can you describe this in a little more detail, please? Or is it working now?
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I do. I want both to stay.

"Klatuu" wrote:

I thought you wanted the form you are opening to stay the way you designed it.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

No, Docmd.Maximize
As for the form vs report. Yes, I know but I'm using some code that shows a
photo and need some command buttons as well so a form works better in this
case for me.

I still need to figure out why this is happening.

Thanks.

"Klatuu" wrote:

In the load event of the form you are opening

Docmd.Restore

That will cause it to take on the shap and position it was when you last
saved the form. It will also cause the other form to reduce it size, however.

Can you tell me why you are using a form to print a record? Why not use a
report? Reports are designed for printing, forms are not.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I have a form that onload, I have it set to maximize. On that form, I have a
command button that opens another form with that record. See code below.
The problems is that when I click the button, the second form also maximizes
and does not seem to take the properties I have set on it. IE: modal, pop
up, etc...

Why is this happening?

Thanks.

Private Sub Command384_Click()
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[auto] = " & Me.[auto]

DoCmd.OpenForm "QC Form", acViewPreview, , strWhere
End If
End Sub

  #15  
Old April 10th, 2008, 07:46 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Open Form

As I said in my first post, form A will change size.
Try opening the form using the acDialog option. That way, you can't go
anywhere from it.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

Ok, that kind of works. It does restore form B to its original state but it
makes form A be not maximized. Also, I have form B set as Modal but it lets
you go to form A. If I open form B up by itself, it keeps all the property
settings but when it is opened through form A, it seems to behave very
different.

Any more suggestions?

Thanks.

"Klatuu" wrote:

That is what I posted earlier.
Docmd.Restore will return form B to its saved size.
How are you determining it is not Modal?
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I have form A and on that form I have a command button. When you click the
button it opens form B with the record you were on in form A. Form A has
onload Maximize. When you click the button and form B opens, it is maximized
and does not seem to take the properties I have set on it. Modal, etc...

If I open the form B by itself, it works fine.

Does that make more sense?

Thanks.

"Klatuu" wrote:

To stay what?
Can you describe this in a little more detail, please? Or is it working now?
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I do. I want both to stay.

"Klatuu" wrote:

I thought you wanted the form you are opening to stay the way you designed it.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

No, Docmd.Maximize
As for the form vs report. Yes, I know but I'm using some code that shows a
photo and need some command buttons as well so a form works better in this
case for me.

I still need to figure out why this is happening.

Thanks.

"Klatuu" wrote:

In the load event of the form you are opening

Docmd.Restore

That will cause it to take on the shap and position it was when you last
saved the form. It will also cause the other form to reduce it size, however.

Can you tell me why you are using a form to print a record? Why not use a
report? Reports are designed for printing, forms are not.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I have a form that onload, I have it set to maximize. On that form, I have a
command button that opens another form with that record. See code below.
The problems is that when I click the button, the second form also maximizes
and does not seem to take the properties I have set on it. IE: modal, pop
up, etc...

Why is this happening?

Thanks.

Private Sub Command384_Click()
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[auto] = " & Me.[auto]

DoCmd.OpenForm "QC Form", acViewPreview, , strWhere
End If
End Sub

  #16  
Old April 10th, 2008, 07:53 PM posted to microsoft.public.access.forms
rml
external usenet poster
 
Posts: 172
Default Open Form

Sorry but what do you mean by acDialog option? Can you explain how?

Thanks.

"Klatuu" wrote:

As I said in my first post, form A will change size.
Try opening the form using the acDialog option. That way, you can't go
anywhere from it.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

Ok, that kind of works. It does restore form B to its original state but it
makes form A be not maximized. Also, I have form B set as Modal but it lets
you go to form A. If I open form B up by itself, it keeps all the property
settings but when it is opened through form A, it seems to behave very
different.

Any more suggestions?

Thanks.

"Klatuu" wrote:

That is what I posted earlier.
Docmd.Restore will return form B to its saved size.
How are you determining it is not Modal?
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I have form A and on that form I have a command button. When you click the
button it opens form B with the record you were on in form A. Form A has
onload Maximize. When you click the button and form B opens, it is maximized
and does not seem to take the properties I have set on it. Modal, etc...

If I open the form B by itself, it works fine.

Does that make more sense?

Thanks.

"Klatuu" wrote:

To stay what?
Can you describe this in a little more detail, please? Or is it working now?
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I do. I want both to stay.

"Klatuu" wrote:

I thought you wanted the form you are opening to stay the way you designed it.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

No, Docmd.Maximize
As for the form vs report. Yes, I know but I'm using some code that shows a
photo and need some command buttons as well so a form works better in this
case for me.

I still need to figure out why this is happening.

Thanks.

"Klatuu" wrote:

In the load event of the form you are opening

Docmd.Restore

That will cause it to take on the shap and position it was when you last
saved the form. It will also cause the other form to reduce it size, however.

Can you tell me why you are using a form to print a record? Why not use a
report? Reports are designed for printing, forms are not.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I have a form that onload, I have it set to maximize. On that form, I have a
command button that opens another form with that record. See code below.
The problems is that when I click the button, the second form also maximizes
and does not seem to take the properties I have set on it. IE: modal, pop
up, etc...

Why is this happening?

Thanks.

Private Sub Command384_Click()
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[auto] = " & Me.[auto]

DoCmd.OpenForm "QC Form", acViewPreview, , strWhere
End If
End Sub

  #17  
Old April 10th, 2008, 08:04 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Open Form

It is the 5th argument of the OpenForm method.
It sets the Modal and Popup properties to Yes.
Look in VBA Help for details.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

Sorry but what do you mean by acDialog option? Can you explain how?

Thanks.

"Klatuu" wrote:

As I said in my first post, form A will change size.
Try opening the form using the acDialog option. That way, you can't go
anywhere from it.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

Ok, that kind of works. It does restore form B to its original state but it
makes form A be not maximized. Also, I have form B set as Modal but it lets
you go to form A. If I open form B up by itself, it keeps all the property
settings but when it is opened through form A, it seems to behave very
different.

Any more suggestions?

Thanks.

"Klatuu" wrote:

That is what I posted earlier.
Docmd.Restore will return form B to its saved size.
How are you determining it is not Modal?
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I have form A and on that form I have a command button. When you click the
button it opens form B with the record you were on in form A. Form A has
onload Maximize. When you click the button and form B opens, it is maximized
and does not seem to take the properties I have set on it. Modal, etc...

If I open the form B by itself, it works fine.

Does that make more sense?

Thanks.

"Klatuu" wrote:

To stay what?
Can you describe this in a little more detail, please? Or is it working now?
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I do. I want both to stay.

"Klatuu" wrote:

I thought you wanted the form you are opening to stay the way you designed it.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

No, Docmd.Maximize
As for the form vs report. Yes, I know but I'm using some code that shows a
photo and need some command buttons as well so a form works better in this
case for me.

I still need to figure out why this is happening.

Thanks.

"Klatuu" wrote:

In the load event of the form you are opening

Docmd.Restore

That will cause it to take on the shap and position it was when you last
saved the form. It will also cause the other form to reduce it size, however.

Can you tell me why you are using a form to print a record? Why not use a
report? Reports are designed for printing, forms are not.
--
Dave Hargis, Microsoft Access MVP


"rml" wrote:

I have a form that onload, I have it set to maximize. On that form, I have a
command button that opens another form with that record. See code below.
The problems is that when I click the button, the second form also maximizes
and does not seem to take the properties I have set on it. IE: modal, pop
up, etc...

Why is this happening?

Thanks.

Private Sub Command384_Click()
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[auto] = " & Me.[auto]

DoCmd.OpenForm "QC Form", acViewPreview, , strWhere
End If
End Sub

  #18  
Old April 11th, 2008, 01:14 AM posted to microsoft.public.access.forms
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Open Form

rml wrote:
Ok, that kind of works. It does restore form B to its original state
but it makes form A be not maximized. Also, I have form B set as
Modal but it lets you go to form A. If I open form B up by itself,
it keeps all the property settings but when it is opened through form
A, it seems to behave very different.

Any more suggestions?


In Access if you maximize one thing you maximize all things. The exception
to this are forms and reports opened as popups. Are you quite sure you set
the modal AND the PopUp property on form B to Yes? Modal won't help with
the size issue, but PopUp should.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.