View Single Post
Old 07-15-2019, 11:24 AM   #7
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 14,507
Thanks: 92
Thanked 1,669 Times in 1,550 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: Open Forms in Datasheet View (All Records)

Billy, my correct answer to #5's question is "No, you shouldn't create a query or a form. You should create whatever works correctly for you." But I gave you the easiest answer so you could get things up and running faster.

Please note that there can be reasons why you would not want to use a query. For one, it is harder to filter the recordset if it ever becomes necessary to hide certain records from certain people based on their role. That becomes harder when opening a stored query using this method, and .OpenQuery requires a query name, not a query (SQL) string. For another, there is no easy error or range checking on queries opened in datasheet mode.

Down the road, if you need to consider filtering what everyone sees, you might need to consider opening a form in continuous mode (which looks similar to a datasheet but isn't one). Forms can have an extant .Recordsource query but can have filters added after the fact by diddling with the form's .Filter and .FilterOn properties. Forms can also do "sanity" checking to verify that a given input makes sense in context.

Therefore, if a query in datasheet mode is all that you need and you don't care much about error issues, you should be OK. If you want finer control later, you probably want some kind of form.

__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is online now   Reply With Quote
The Following User Says Thank You to The_Doc_Man For This Useful Post:
billgyrotech (07-15-2019)