423,335 Members | 1,149 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,335 IT Pros & Developers. It's quick & easy.

If DataSheet view then maximize.. possible with code?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.