Thread
:
Best Practice for tables?
View Single Post
#
28
August 21st, 2007, 11:38 PM posted to microsoft.public.access.gettingstarted
Steve[_10_]
external usenet poster
Posts: 608
Best Practice for tables?
Repeatedly MVPs advise posters not to use spaces in object names and here
you are going against "learned" advise and putting spaces in query names????
So besides wasting a lot of time typing long object names, you have to
remember to put square brackets around your query names. Do you put square
brackets around table names or do you use another set of rules for table
names?
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
"Tony Toews [MVP]" wrote in message
...
"Gina Whipp" wrote:
Just curious... (Always willing to learn something new!)
What about in the case of DLookUp's (just one example), how would you know
where you are pulling the data from? Or do you table and query names
never
match?
I never use DLookups but code my own using recordsets and queries
usually defined in VBA code.
My table and query names can never match as my query names are quite
lengthy and descriptive and always have spaces. (Well almost always).
For example in a simple system I built for memberships the table names
are
Activity
Emails
GlobalOptions
Member
MemberFamily
MembershipActivity
MembershipEmails
Status
And the query names are
Acknowledgements to be sent via email
Acknowledgements to be sent via snail mail
Action - Acknowledgements
Action - Renewals
Active members
Activity - Renewal
Activity Summary - MembershipActivityDetails
AGM Notices to be sent
AGM Notices to be sent - Actiivity Append
Integrity checker - Renewals but not active
Membership Acknowledgements - Outstanding
Membership Activity History
Membership Renewals - Outstanding
Membership Renewals Outstanding
MembershipDetailReport
MembershipNoneDetailReport
Name Badges to be sent via snail mail
Non members with Email Addresses
Renewal Acknowledgements to be sent via email
Renewal Acknowledgements to be sent via snail mail for Pending R
Renewal Notices to be sent
Renewal Notices to be sent via email
Renewal Notices to be sent via snail mail
The code I used to produce the above is (as adapted from A97 help)
Sub ListQueryNames()
Dim qry As QueryDef, db As Database
Dim dbs As Database
Dim qdf As QueryDef
Set dbs = CurrentDb
For Each qdf In dbs.QueryDefs
Debug.Print " " & qdf.Name
Next qdf
End Sub
Sub ListTableNames()
Dim qry As TableDef, db As Database
Dim dbs As Database
Dim tdf As TableDef
Set dbs = CurrentDb
For Each tdf In dbs.TableDefs
Debug.Print " " & tdf.Name
Next tdf
End Sub
Now I have a much larger system with 160 tables, 1200 queries, 450
forms and 350 reports. But that would be rather long for folks to
look at the names. smile
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -
http://msmvps.com/blogs/access/
Steve[_10_]
View Public Profile
View message headers
Find all posts by Steve[_10_]
Find all threads started by Steve[_10_]