PC Review


Reply
Thread Tools Rate Thread

Auto Populate

 
 
CJ
Guest
Posts: n/a
 
      10th Apr 2010
Hi,

Could someone please explain in very basic terms of how to auto populate a
field in a table.

I would like to enter a user ID and the address, name ect comes up
automatically.

Many thanks
 
Reply With Quote
 
 
 
 
Al Campagna
Guest
Posts: n/a
 
      10th Apr 2010
CJ,
Well, very basically, try using a combo (bound to the ID field)
to select the ID.
But, as a genereally accepted rule, don't re-capture all
the other ancillary information, like Address, City, etc. Just "display" it
on the form.
Since you capture the ID, you can always rederive the ancillary
information
"on the fly" in any subsequent form, query,or report.
That combo might display just ID and Name, but also have columns for
Address, City, State, etc...
After a selection is made you can display all the ancillary info with
calculated controls.
Given these combo (ex. cboID) columns...
ID Name Address City ... etc....
A text control iwth a ControlSource of...
= cboID.Column(2)
will always display the Address value from the combo.
(Combo cols are numbered left to right... 0,1,2,3,4,etc)
=cboID.Column(3)
would display the City value, and so on and so on.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"CJ" <(E-Mail Removed)> wrote in message
news:2D908DFC-2599-4BB3-B44E-(E-Mail Removed)...
> Hi,
>
> Could someone please explain in very basic terms of how to auto populate a
> field in a table.
>
> I would like to enter a user ID and the address, name ect comes up
> automatically.
>
> Many thanks



 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      10th Apr 2010
On Sat, 10 Apr 2010 05:29:01 -0700, CJ <(E-Mail Removed)> wrote:

>Hi,
>
>Could someone please explain in very basic terms of how to auto populate a
>field in a table.
>
>I would like to enter a user ID and the address, name ect comes up
>automatically.
>
>Many thanks



You don't!

Relational databases use the "Grandmother's Pantry Principle": "A place - ONE
place! - for everything, everything in its place".

The user's name, address, and so on should be stored in the User table and
*noplace else*. Storing it redundantly in a second table wastes space, and
more importantly makes it possible to have inconsistant data: you could have a
user with one address in the user table, and a different address in this
second table.

The second table should have ONLY the UserID; if you need to see that table's
data in conjunction with user biographical data, you can use a Query joining
the tables, or a Form to *display* (but not store) the user data. To do the
latter include the address, name, etc. in the combo's rowsource query, and put
textboxes on the form with control sources like

=comboboxname.Column(n)

where n is the zero-based position of the column you want to see.
--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto populate dcrqueens Microsoft Access Forms 3 30th Oct 2009 04:17 PM
Auto-populate, Auto-copy or Auto-fill? =?Utf-8?B?SmF5IFMu?= Microsoft Excel Worksheet Functions 4 10th Aug 2007 09:04 PM
Auto populate =?Utf-8?B?UmVuZWU=?= Microsoft Access 2 10th Feb 2007 03:17 AM
Auto Populate t568aort568b@aol.com Microsoft Access Forms 1 4th May 2006 06:03 PM
Auto populate or auto completion Nancy Windows XP Internet Explorer 2 2nd Sep 2003 06:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:59 PM.