468,256 Members | 1,436 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,256 developers. It's quick & easy.

If DataSheet view then maximize.. possible with code?

Hi
My users are going to toggle back and forth between DataSheet and Form
view. This eliminates the need for a pile of queries <g>

Anyway, I would like my form to be viewed at the current size (I had
removed the min max buttons). But when in Datasheet view I would like
it to maximize. If I maximize the view while in DataSheet then when
the user toggles to Form it stays maximized and looks ugly.

Is there any code along the lines of
if me.DatasheetView = true then doCmd.maximize

Just a long shot....., perhaps a Macro to run from a right click and
leave the form coded to no max min buttons, Would that work?
Ralph
Nov 12 '05 #1
1 3422
Thanks Matthew....... works like a charm

On Mon, 8 Sep 2003 19:02:52 -0700, "Matthew Reeves"
<mr*****@nospam.bytemyzer.com> wrote:
"Ralph" <un*****@yahoo.com> wrote in message
news:k9********************************@4ax.com.. .
Hi
My users are going to toggle back and forth between DataSheet and Form
view. This eliminates the need for a pile of queries <g>

Anyway, I would like my form to be viewed at the current size (I had
removed the min max buttons). But when in Datasheet view I would like
it to maximize. If I maximize the view while in DataSheet then when
the user toggles to Form it stays maximized and looks ugly.

Is there any code along the lines of
if me.DatasheetView = true then doCmd.maximize

Just a long shot....., perhaps a Macro to run from a right click and
leave the form coded to no max min buttons, Would that work?
Ralph


In the form's Class Module, enter the following code:

Private Sub Form_Current()

Select Case Forms("FormName").CurrentView
Case 1
DoCmd.Restore
Case 2
DoCmd.Maximize
End Select

End Sub


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Keith Wilby | last post: by
2 posts views Thread by Georges Heinesch | last post: by
4 posts views Thread by danit58 | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.