Tip The Ten Commandments of Access (1 Viewer)

coxmg

New member
Local time
Today, 04:30
Joined
Sep 29, 2011
Messages
4
Dont forget to familiarize yourself with the differences between the various copies of ACCESS.-
 

Yorkiemuncher

New member
Local time
Today, 11:30
Joined
Mar 2, 2011
Messages
6
I learnt the 10 Commandments of Access the hard way...and now i live by them, but the really key is undstanding what you really want your database to achieve or in my case at the moment is building a little game and using the tables to store the data for players names and scores and other additional user content. Hopefully i will post the application here very shortly.
 

greenear

Registered User.
Local time
Today, 11:30
Joined
Jan 25, 2012
Messages
12
Yorkiemuncher said:
I learnt the 10 Commandments of Access the hard way...and now i live by them,

I shall adhere to them as good as I am able XD
 

EL_Gringo

Member
Local time
Today, 05:30
Joined
Aug 22, 2012
Messages
38
Thou shalt not use "SendKeys", "Smart Codes" or "GoTo" (unless the GoTo be part of an OnError process) for these will lead you from the path of righteousness.

I skipped 'GoTo' since I worked with the wonderful (structured) GFA-Basic for Atari, back in '87. In fact, I can only imagine one case (except for the mentioned case of error-trapping) of a useful GoTo, that is when a friend calls and says 'GO TO David's bar, I'll be there in 5 minutes'. All the rest can be dealt with with If, Select Case, Loops and a an eventual 'exit sub' here and there.

Thanks for the post, DCrake!

El Gringo
 

kipcliff

Registered User.
Local time
Today, 06:30
Joined
Sep 19, 2012
Messages
71
It's nice to see a listing of lessons I learned the hard way. I wish I had this list when I started working with Access. lol
 

jeds

Registered User.
Local time
Today, 07:30
Joined
Nov 21, 2012
Messages
28
thou shalt abhor the use of "Lookup Fields" which art the creation of the Evil One.

OK, I would like to understand the reasoning behind this one. I have read this elsewhere, but as a newbie the explanation did not sink in. To explain what I *think* I understand at this point:

Lookup fields are Lookup and Relationship fields where you type in the fields you want available in the dropdown box??? As opposed to pulling them from a table?

I think I also understand that you have to use a particular one of these if you are building an online database, which I am not doing and do not expect to ever do.

In the back of my mind something is shouting "value fields", is that related to this subject or am I really lost?

Thanks
 

reyvr24

New member
Local time
Today, 22:30
Joined
Dec 1, 2012
Messages
2
I really enjoy reading this thread ;) Though I have learned already some of this commandments the hard way, it's nice to know that there is logic behind all the challenges in creating a good database.
 

MartinC

New member
Local time
Today, 04:30
Joined
Nov 9, 2012
Messages
3
I've seen numerous databases where the programmer had spaces in the names. I've done that a few times, too, and haven't encountered any problems. What is the downside to spaces in names?
 

John Big Booty

AWF VIP
Local time
Today, 22:30
Joined
Aug 29, 2005
Messages
8,263
I've seen numerous databases where the programmer had spaces in the names. I've done that a few times, too, and haven't encountered any problems. What is the downside to spaces in names?

If you have spaces embedded in object names then when they are referenced (in VBA code) the name must be enclosed within square brackets, which are not required if spaces are not used.
 

Rabbie

Super Moderator
Local time
Today, 11:30
Joined
Jul 10, 2007
Messages
5,906
OK, I would like to understand the reasoning behind this one. I have read this elsewhere, but as a newbie the explanation did not sink in. To explain what I *think* I understand at this point:

Lookup fields are Lookup and Relationship fields where you type in the fields you want available in the dropdown box??? As opposed to pulling them from a table?

I think I also understand that you have to use a particular one of these if you are building an online database, which I am not doing and do not expect to ever do.

In the back of my mind something is shouting "value fields", is that related to this subject or am I really lost?

Thanks
This refers to lookup tables in Tables not in forms. Look-ups in tables just make things difficult as you don't see what is actually stored.
 

Lightwave

Ad astra
Local time
Today, 11:30
Joined
Sep 27, 2004
Messages
1,521
Here's another way of explaining it.

For many computer languages a simple space is a special character that generally separates things denoting the end of one thing and the start of another.

Therefore if you have a column which is called The First Field.
Computer languages tend to consider that as three different things they don't recognize context which is something which comes naturally to us.

It's also a reason why you should avoid other special characters eg / naming a file star/wars and then referring to it in code would cause an error as the computer would think you are changing directory.

A more general rule could be avoid special characters when naming objects.
 

ChrisO

Registered User.
Local time
Today, 22:30
Joined
Apr 30, 2003
Messages
3,202
To quote MartinC in post #69…

>>I've done that a few times, too, and haven't encountered any problems.<<

If MartinC can put even one space in a name and it works then it would appear that MartinC knows how to do it.

Can anyone produce a sample of the same VBA code or SQL which works sometimes but fails at other times due to a space?

I’m not saying it can’t be done but I would like to see it.

Chris.
 

nanscombe

Registered User.
Local time
Today, 11:30
Joined
Nov 12, 2011
Messages
1,082
Indeed, it's easy to use names with spaces.

As long as you are in the habit of enclosing every field / table name etc in square brackets.
 

Rabbie

Super Moderator
Local time
Today, 11:30
Joined
Jul 10, 2007
Messages
5,906
Indeed, it's easy to use names with spaces.

As long as you are in the habit of enclosing every field / table name etc in square brackets.
Exactly. Always enclose them in square brackets if you use spaces. Personally I can see no need to have spaces. To me FirstField is just as clear as First Field and also one less char to type 3 less if you include the square brackets. Still whatever people are happy with.
 

nanscombe

Registered User.
Local time
Today, 11:30
Joined
Nov 12, 2011
Messages
1,082
Once you learn camelCaseForWords you don't tend to look back.

Once learnt it's a useful skill (technique) to pass on to others.
 

AJR

Registered User.
Local time
Today, 19:30
Joined
Dec 22, 2012
Messages
59
Hi

Very new to access and just wondering why using lookup fields is so bad, errrr, evil?

Should one use combo boxes in their place?

Thanks
 

smithdavid

Registered User.
Local time
Today, 04:30
Joined
Jun 26, 2013
Messages
13
1. Ask, "Would an infinite being truly choose this?"

2. Everything is just an interesting point of view

]3. Live in 10 second increments

4. Live as the question (not as the answer)

5. No form, no structure, no significance

6. No judgment, no discrimination, no discernment

7. No drugs of any kind

8. No competition


9. Do not listen to, tell, or buy the story


10. No exclusion
 

nanscombe

Registered User.
Local time
Today, 11:30
Joined
Nov 12, 2011
Messages
1,082
A couple of thoughts ...

1. Ask, "Would an infinite being truly choose this?"
An infinite being could do anything for any reason, otherwise they would be finite
2. Everything is just an interesting point of view
"Thou shalt not ra**, murder or kill", interesting but merely a point of view.
]3. Live in 10 second increments

4. Live as the question (not as the answer)

5. No form, no structure, no significance
No rules? Therefore this list is meaningless
6. No judgment, no discrimination, no discernment
No justice, no punishment, no vengence
7. No drugs of any kind
No penicillin, no aspirin, no insulin
8. No competition
No reason to improve or strive to a goal, stagnation
9. Do not listen to, tell, or buy the story


10. No exclusion

If there was no judgement how can one justify telling others what they say, or do, is wrong?

Or ensure that the "commandment" are obeyed?
 
Last edited:

Users who are viewing this thread

Top Bottom