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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Populating a field Automatically



 
 
Thread Tools Display Modes
  #1  
Old September 25th, 2008, 11:32 AM posted to microsoft.public.access.tablesdbdesign
Andrea Stimson
external usenet poster
 
Posts: 8
Default Populating a field Automatically

Hello, I am in the process of setting up a project database in access and
need some help. I have set up 2 tables linked through the site id. One table
holds the project info and the other lists the site id and site name. (1 to
many)

What I'm trying to do is get the database to automatically populate the site
name based on the user inputing the site ID. Currently one field is updated
via a form with a drop down list of site numbers (5 digit code).

So in the form once the site id is selected I what the form to automatically
input the relating site name. If you could please offer some advice.

Kind Regards


--
Andrea Stimson
Technical Administrator
  #2  
Old September 25th, 2008, 06:24 PM posted to microsoft.public.access.tablesdbdesign
Golfinray
external usenet poster
 
Posts: 1,597
Default Populating a field Automatically

What you would normally do is set up a search. You could enter siteID and
the information about site ID would then be populated. To do that, put a
combo box on the form. Allow the combo box wizard to do that for you,
specifying your site ID as the source (the wizard will ask you.) The right
click on the combo box, go to properties, go to the event property, and click
the little button out to the right of the Afterupdate event. When it asks you
what you want to do, enter start the code builder. Type this in:
Me.filter = "[siteid] = """ & Me.combo# & """"
Me.filteron = true
The combo box number will be listed there, like combo12 or combo34.

"Andrea Stimson" wrote:

Hello, I am in the process of setting up a project database in access and
need some help. I have set up 2 tables linked through the site id. One table
holds the project info and the other lists the site id and site name. (1 to
many)

What I'm trying to do is get the database to automatically populate the site
name based on the user inputing the site ID. Currently one field is updated
via a form with a drop down list of site numbers (5 digit code).

So in the form once the site id is selected I what the form to automatically
input the relating site name. If you could please offer some advice.

Kind Regards


--
Andrea Stimson
Technical Administrator

  #3  
Old September 29th, 2008, 12:01 PM posted to microsoft.public.access.tablesdbdesign
Andrea Stimson
external usenet poster
 
Posts: 8
Default Populating a field Automatically

Thanks, this is really helpfull and has worked however I have one question
linked to this. I need the info from the combo box to update the field called
"Final site name" in the main project table so I can use the data for
reporting. currently it's not linked.

If you could please offer some advise.

Thanks
Andrea




--
Andrea Stimson
Technical Administrator


"Golfinray" wrote:

What you would normally do is set up a search. You could enter siteID and
the information about site ID would then be populated. To do that, put a
combo box on the form. Allow the combo box wizard to do that for you,
specifying your site ID as the source (the wizard will ask you.) The right
click on the combo box, go to properties, go to the event property, and click
the little button out to the right of the Afterupdate event. When it asks you
what you want to do, enter start the code builder. Type this in:
Me.filter = "[siteid] = """ & Me.combo# & """"
Me.filteron = true
The combo box number will be listed there, like combo12 or combo34.

"Andrea Stimson" wrote:

Hello, I am in the process of setting up a project database in access and
need some help. I have set up 2 tables linked through the site id. One table
holds the project info and the other lists the site id and site name. (1 to
many)

What I'm trying to do is get the database to automatically populate the site
name based on the user inputing the site ID. Currently one field is updated
via a form with a drop down list of site numbers (5 digit code).

So in the form once the site id is selected I what the form to automatically
input the relating site name. If you could please offer some advice.

Kind Regards


--
Andrea Stimson
Technical Administrator

 




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 07:39 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.