472,789 Members | 1,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

Similar topics

3
by: Keith Wilby | last post by:
I have a form which allows both form and datasheet views. My question is, is it possible to control the field (column) names in datasheet view? What happens at the moment is that the name is...
4
by: Terry | last post by:
I have created a Main Switchboard in Access 2000 and it has a button which opens a Form. I have set the form Properties Default View to Datasheet and this always opens in datasheet view. When I...
2
by: Georges Heinesch | last post by:
Hi: I have a tables in relationship to each other. When I open the main table (table 1), I see a "+" at the very left of every record. Clicking on the "+" expands the data of the linked table...
13
by: Aladdin | last post by:
I have an MS Access form on which I have a listbox listing tables in that database. I want to be able to click on any of those tables and view its contents on the same form using subforms or any...
4
by: danit58 | last post by:
Is it possible format the backcolor of rows, depending the value in a field of the the rekords, in datasheet mode?? Can you help me???
1
by: Yuki | last post by:
I am trying to find out if I can have a specific record that has been selected in a list box be opened in datasheet view. I can't seem to find where this can happen or what I need to use to make...
1
by: sasan3 | last post by:
when I set visible=false, then entry is not visible in form view, but still shows up in datasheet view. How do I make a field not to show based on some condition in datasheet view? Tx.
1
by: Simon | last post by:
Dear reader, In a form with the property "Default view" as DataSheet I like to hide some fields in the datasheet view. It is possible to manage this with the command Format>>Unhide...
2
by: Alan Forsyth | last post by:
That rather long subject says it. In Access97 running on XP - I want to display a Maximized size Form01, then open a Restore size Datasheet View Form02 on top of the first Form. PopUp won't give...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.