A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto Populate



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2010, 01:29 PM posted to microsoft.public.access.forms
CJ
external usenet poster
 
Posts: 299
Default Auto Populate

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
  #2  
Old April 10th, 2010, 02:07 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Auto Populate

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" wrote in message
...
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



  #3  
Old April 10th, 2010, 06:02 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Auto Populate

On Sat, 10 Apr 2010 05:29:01 -0700, CJ 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]
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.