DoCMD maximize

T

tomrector

Access 2003 XP pro

I have a form (1st form) that I use as a selection list for a query
parameter. Works great.
A button (code below) submits the query parameter data to a form (2nd
form) whose source is that query.

My problem is that when I "close" the 2nd form (command button-close
form) it returns to the 1st form,
but is no longer full screen. Even though the 1st form is set to
maximize on opening.

I have saved the 1st form at extreme hieght and width, even put
graphics in as place (space) holders to try to make the form open
larger, no success.

What can I do to make the 1st form screen return as maximized ?

Private Sub Command4_Click()
On Error GoTo Err_Command4_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmACLASS"

stLinkCriteria = "[txtTitle]=" & "'" & Me![txtTitle] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command4_Click:
Exit Sub

Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click

End Sub

Any help/direction is appreciated,

Tom Rector



Any ideas ?
 
T

tomrector

Ha ha, guess we all had our laugh (laff) now........

I do have a Maximize in the onOpen event of the 1st form, Maybe I
should show they actual query, the WHERE clause is probably of
concern.

SELECT CLASS.ID1, CLASS.CartFile, CLASS.ID, CLASS.txtTitle,
CLASS.AgeGP, CLASS.StartDate, CLASS.EndDate, CLASS.NumbSession,
CLASS.DaySet, CLASS.StartTime, CLASS.FinishTime, CLASS.DeadLine,
CLASS.Location, CLASS.Tuition, CLASS.SupFeeNow, CLASS.TcostNow,
CLASS.SupFeeClass, CLASS.Instructor, CLASS.CODE, CLASS.MinStudnts,
CLASS.MaxStudnts, CLASS.SupFeeClass2, CLASS.PreReq, CLASS.ClassComnts,
CLASS.ClassDesc, CLASS.ClassPic, CLASS.Field27, CLASS.Load
FROM CLASS
WHERE (((CLASS.txtTitle)=[Forms]![AClass]!
Code:
));

1st form is used for a one field,  drop down form, with a command
(4) button.
Form 2 is used to edit data on in the CLASS table select by the 1st
form' drop down pick.
(a pick list for a query)

When exiting form2,   form1 is still open and is not maximized, very
inconvenient for the user.  As well I noticed that the switchboard is
also not maximized and can been seen behind the 1st form.


Thomas Rector   (not the best speller in the group)




[QUOTE]
Put DoCmd.Maximize in the Activate event of 1st form.
--
Dave Hargis, Microsoft Access MVP


[QUOTE="[email protected]"]
Access 2003   XP pro

I have a form (1st form) that I use as a selection list for a query
parameter.  Works great.
A button (code below) submits the query parameter data to a form (2nd
form) whose source is that query.

My problem is that when I "close" the 2nd form  (command button-close
form) it returns to the 1st form,
but is no longer full screen. Even though the 1st form is set to
maximize on opening.

I have saved the 1st form  at extreme hieght and width, even put
graphics in as place (space) holders to try to make the form open
larger, no success.

What can I do to make the 1st form screen return as maximized ?

Private Sub Command4_Click()
On Error GoTo Err_Command4_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmACLASS"

stLinkCriteria = "[txtTitle]=" & "'" & Me![txtTitle] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command4_Click:
Exit Sub

Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click

End Sub

Any help/direction is appreciated,

Tom Rector



Any ideas ?
[/QUOTE][/QUOTE]
 
T

tomrector

Ha ha, guess we all had our laugh (laff) now........

I do have a Maximize in the onOpen event of the 1st form, Maybe I
should show they actual query, the WHERE clause is probably of
concern.

SELECT CLASS.ID1, CLASS.CartFile, CLASS.ID, CLASS.txtTitle,
CLASS.AgeGP, CLASS.StartDate, CLASS.EndDate, CLASS.NumbSession,
CLASS.DaySet, CLASS.StartTime, CLASS.FinishTime, CLASS.DeadLine,
CLASS.Location, CLASS.Tuition, CLASS.SupFeeNow, CLASS.TcostNow,
CLASS.SupFeeClass, CLASS.Instructor, CLASS.CODE, CLASS.MinStudnts,
CLASS.MaxStudnts, CLASS.SupFeeClass2, CLASS.PreReq, CLASS.ClassComnts,
CLASS.ClassDesc, CLASS.ClassPic, CLASS.Field27, CLASS.Load
FROM CLASS
WHERE (((CLASS.txtTitle)=[Forms]![AClass]!
Code:
));

1st form is used for a one field,  drop down form, with a command
(4) button.
Form 2 is used to edit data on in the CLASS table select by the 1st
form' drop down pick.
(a pick list for a query)

When exiting form2,   form1 is still open and is not maximized, very
inconvenient for the user.  As well I noticed that the switchboard is
also not maximized and can been seen behind the 1st form.


Thomas Rector   (not the best speller in the group)




[QUOTE]
Put DoCmd.Maximize in the Activate event of 1st form.
--
Dave Hargis, Microsoft Access MVP


[QUOTE="[email protected]"]
Access 2003   XP pro

I have a form (1st form) that I use as a selection list for a query
parameter.  Works great.
A button (code below) submits the query parameter data to a form (2nd
form) whose source is that query.

My problem is that when I "close" the 2nd form  (command button-close
form) it returns to the 1st form,
but is no longer full screen. Even though the 1st form is set to
maximize on opening.

I have saved the 1st form  at extreme hieght and width, even put
graphics in as place (space) holders to try to make the form open
larger, no success.

What can I do to make the 1st form screen return as maximized ?

Private Sub Command4_Click()
On Error GoTo Err_Command4_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmACLASS"

stLinkCriteria = "[txtTitle]=" & "'" & Me![txtTitle] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command4_Click:
Exit Sub

Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click

End Sub

Any help/direction is appreciated,

Tom Rector



Any ideas ?
[/QUOTE][/QUOTE]
 
R

Ruel Cespedes via AccessMonster.com

On the Form in question create an OnActivate Event Procedure. See Code below:


Private Sub Form_Activate()
DoCmd.Maximize
End Sub

Ruel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top