- Local time
- Today, 07:27
- Joined
- Feb 19, 2002
- Messages
- 47,035
SQL strings embeded in the RecordSource property of Forms and Reports are actually stored as querydefs. They start with a ~ and are hidden unless you check the show system objects button. So essentially they are no different from normal querydefs.I don't know that having the SQL in the Form or Report will speed up or slow down the database but it certainly keeps things neat and tidy and saves file size.
No. Storing the queries directly in the Forms and reports makes it easier for some things like copying forms/reports from database to database but impossible for others such as reuse. I prefer to have standard queries that I use in many places. It reduces the overall number of objects in my databases (remember the RecordSources are saved as objects) and saves me work because I don't have to keep reinventing the wheel. Querydefs also can be changed by NameAutoCorrect, not that I have it always on, but I do occassionally want to rename table columns and I want the queries to be changed automatically.I understand it is the preferred method for "experienced" developers
Several of you are still chatting about compacting, temp tables, and SQL strings. Please read my post #39 where I identify the two largest causes of bloat.
If you are really worried about someone modifying your queries, the only viable solution is to ditch Access and go with a compiled language such as VB.Net or C#.Net. An Access database is a container and as a file type, it is much easier to hack than an .exe.
Once you are ready to build the .accde, hide all the objects and set the navigation pane to not show any groups. Make a backup!!!! Set the Allow Bypass property to prevent opening with the shift key (you should code a back door in the app to reverse this), create the .accde, rename it to .accdr. The database is not secure by any means but you've made it very difficult for non-technical people to even see anything, let alone modify it.