How to prevent query opening in maximum. (1 Viewer)

JOWINO

New member
Local time
Tomorrow, 00:39
Joined
Jul 12, 2024
Messages
3
I have set my main form to Maximize On Activate.
I have set the forms to Pop Up Yes
Now I have issues with opening the queries, The queries are maximizing
forcing me to close the entire database and open again.
Kindly how can I sort this?
 
Size your queries when you create them.
Then they will open to that size.

Try resizing one to see it happen.
 
To prevent queries from opening full screen, it’s best to avoid opening queries directly in Datasheet view, as this can be difficult to control and isn’t ideal for user interaction. Instead, create a form based on your query to manage how the data is displayed. Here’s how you can do it:
Create a Form: In your database (e.g., Microsoft Access), go to the Create tab and select Form Wizard or Form Design. Choose your query as the data source.
Customize the Form: Adjust the form’s properties (e.g., size, layout, default view) to control its appearance. For example, set the form’s Auto Resize property to "No" and define a specific width/height in the Form Properties.
Open the Form Instead: Use a button, macro, or VBA code to open the form instead of the query. For example, in VBA, use DoCmd.OpenForm "YourFormName" rather than DoCmd.OpenQuery "YourQueryName".
Prevent Direct Query Access: If you want to ensure users don’t open the query directly, consider hiding it in the Navigation Pane or setting permissions to restrict access.
This approach gives you better control over the interface and prevents the query from opening full screen. If you’re still having issues, could you share more details about your setup (e.g., database software, how the query is being opened)?

Answer composed by Grok from my rough draft...

Update:- my VBA beginner blog on my website here demonstrates how you can place a query on a form:-

 
Last edited:
using DoCmd.Maximize, will affect all "windows" you open and will open maximized.

it is better to use DoCmd.Move
 

Users who are viewing this thread

Back
Top Bottom