Hi there,
A reference is very much the same thing that a short-cut on your
desktop is.
The short-cut on your desktop is a reference to another object.
It is NOT the object itself. For instance, you can create a
short-cut to a program, and you will notice that the actual program
itself is in one place, and the short-cut can be in the same folder or
another folder. And you can move the short-cut anywhere you like
and use it to start up the program it is referring to.
You can delete the short-cut as well to get rid of clutter and it will
not affect the program at all, you'll just have one less "reference"
to the program (or one less short-cut).
In a database, you can create a database to another table, and this
is typically called a linked table, but it IS a reference. This is NOT
to be confused with the process of linking tables to create
relationships, and I myself get confused I see people asking
questions about linked tables, because you have to wonder if they
are talking about the relationship between two tables, or about a
physically linked table. The physically linked table is just a pointer
to another table, and if you DELETE the physical linkage, you
do NOT delete the table, just the reference to the table is
deleted.
Programmers use references all the time. When you create a form
it is typically given the name Form1. This is just a reference to a
form class object, and while it is and can be a physical object, it
really in the end is what is called an instantiated class object. Once
it is instantiated, it exists. I'm explaining this, because the word
"reference" doesn't always mean a separate short-cut that, but
in this case becomes the object.
So when programmers are talking about references, there can
be a couple meanings that are slightly different from each other.
It is really just a concept, of using pointers to get to an object.
To illustrate this a little better, say you've created a form with
a listbox on it. The programming language will (in this case the
language would be VBA or VBScript) hold references to the
form. The form is referred to through it's reference (ie the
name of the form). The listbox on the form has a name as
well and can be referred to by it's name or by what's called
a fully qualified reference or a fully qualified name.
Form1.ListBox1
The items in the ListBox can be selected and the information
contained within can be queried, or extracted, via a reference
to the particular item in the listbox...
Form1.ListBox1.Items(n).Text
where n is a 0-based number representing a certain position
in the list of items, and the .Text means you want to extract
the information from it. So .Text is a reference to the contents
contained within the ListBox at the n'th position.
Hope that helps!
Have fun!
--
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.
:
I am a relatively new Access user, so I check the Access
newsgroups regularly for tips and info...I have learned a
lot just reading the questions and solutions! Anyway, now
I have a question...
I see a number of questions regarding "References". I
looked it up in the Help section of my application, and
the information was written as though I had a clue as to
what they were talking about! However, I don't! Can
someone explain in plain English what the heck a reference
is and how/why it may be used?
Thanks for all your help in the past, and more in advance
for this question.