By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,982 Members | 1,939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,982 IT Pros & Developers. It's quick & easy.

Amature Question

P: n/a
I have an Access data sheet for traffic in Saskatchewan. 4 of the
columns are:
Location, Code(area code of the location), Province, Region

Obviously for each location, the code, province and region are the
same for that respective location. I am trying to make it so that
when I select a location (using a dropdown box) that the province,
region and code are automatically filled in. I do not need an exact
answer, just some details of where to look. I have went through the
Access manual for SQL commands and Quereys and have not found
something that will help me.. if anyone knows where to look to achieve
this please let me know, as well, if someone knows that this is in
fact impossible in Access, that would also be appreciated

Thank you,

John

May 10 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 10 May 2007 13:49:30 -0700, sw********@hotmail.com wrote:
>Obviously for each location, the code, province and region are the
same for that respective location. I am trying to make it so that
when I select a location (using a dropdown box) that the province,
region and code are automatically filled in. I do not need an exact
AfterUpdate command

May 10 '07 #2

P: n/a
You should have the tables:
TblRegion
RegionID
Region

TblProvince
ProvinceID
RegionID
Province

TblLocation
LocationID
ProvinceID
Location
Code

To get the results you want, your dropdowm box should be based on a query
that includes all three tables. The fields in the query should be
LocationID, Location, Code, Province and Region. Set the Bound Column
property to 1, Columns to 5 and Column Width to 0;2;0;0;0.

The dropdown will display Location for you to select.

Put the following code in the AfterUpdate event of the combobox:
Me!NameOfCodeTextBox = Me!NameOfComboBox.Column(1)
Me!NameOfProvinceTextBox = Me!NameOfComboBox.Column(2)
Me!NameOfRegionTextBox = Me!NameOfComboBox.Column(3)

Be sure to put your names in for the textboxes and the combobox.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com

<sw********@hotmail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
I have an Access data sheet for traffic in Saskatchewan. 4 of the
columns are:
Location, Code(area code of the location), Province, Region

Obviously for each location, the code, province and region are the
same for that respective location. I am trying to make it so that
when I select a location (using a dropdown box) that the province,
region and code are automatically filled in. I do not need an exact
answer, just some details of where to look. I have went through the
Access manual for SQL commands and Quereys and have not found
something that will help me.. if anyone knows where to look to achieve
this please let me know, as well, if someone knows that this is in
fact impossible in Access, that would also be appreciated

Thank you,

John

May 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.