Updating Multiple Fields on Form based on Combo Box Selection

G

Guest

Hello to all! I'm in a bit of a bind and was hoping someone could answer my
question? I have created a database in access 2003 which consists of a few
forms. One of which has a filter on it based no the CaseNumber of the file.
Next to the CaseNumber I have an PersonID. The PersonID on the form is a
combo box that shows 4 individual names along with a last option for "Other".
I was wondering 2 things:

1. If I had selected a PersonID based on that combo box, how would I get
the PersonName textbox to fill out with the correct name based on the
PersonID?

2. PersonID has four ID numbers along with an option for "Other". If I
select "Other", how could I have the PersonName field come up blank for data
entry?
 
G

Guest

1. was answered by Scubadiver in a post not long ago

In the afterupdate event of the combo use

[textbox2] = [combobox].column(n)

where "n" is the column number for the description (zero is the first
column) and obviously change "textbox2" and [combobox] as appropriate

2. You could have that option open a form whose record source is bound the
table with its property set to data entry only
 
G

Guest

Hely Falty! Thanks you for responding soo quickly to my post. I'm not sure
if I understand correctly and maybe I'm not providing enough info. Please
forgive me for I am not that knowledgeable in MS Access. The IDNumber is the
first combox box on the form and it displays two columns, one showing the
actual IDNumber and the other showing the name. This is to give the user a
easy way to select the person desired. Those choices are being pulled from a
seperate table only containing those two pieces of data. However the form
itself has Title, First Name, Last Name, Job Location, Address, City, State,
etc. All of that info is to be saved in a seperate table. As you probably
may have figured out by now, I'd like that those empty fields (Title, First
Name, Last......) fill out automatically based on the IDNumber that I select
from the initial combo box. Now that I'm actually writing this out, I'm
begining to think that the table that contains the "IDNumber" and the
"IDName" should have these seperate fields included.



Falty said:
1. was answered by Scubadiver in a post not long ago

In the afterupdate event of the combo use

[textbox2] = [combobox].column(n)

where "n" is the column number for the description (zero is the first
column) and obviously change "textbox2" and [combobox] as appropriate

2. You could have that option open a form whose record source is bound the
table with its property set to data entry only


--
Let me know how you get on

Falty


mikeybikes said:
Hello to all! I'm in a bit of a bind and was hoping someone could answer my
question? I have created a database in access 2003 which consists of a few
forms. One of which has a filter on it based no the CaseNumber of the file.
Next to the CaseNumber I have an PersonID. The PersonID on the form is a
combo box that shows 4 individual names along with a last option for "Other".
I was wondering 2 things:

1. If I had selected a PersonID based on that combo box, how would I get
the PersonName textbox to fill out with the correct name based on the
PersonID?

2. PersonID has four ID numbers along with an option for "Other". If I
select "Other", how could I have the PersonName field come up blank for data
entry?
 
G

Guest

OK i get you, you are correct in thinking that it might be better to do it
slightly differently. i would break the tables up slightly differently like
this

Title:
TitleID - Autonumber
Title - Text

Job Location: (only needs its own table if locations are repeated)
JobLocationID - Autonumber
JobLocation - Text

You could also do differnt tables for City and State in the same mannor if
you felt that there was enough repititions for this to be required

Then the main Table will be:
Person ID - Autonumber
Title - which will draw its info from The Title Table
First Name
Surname
Job Location which will draw its info from The job location table
Address
City based on table if one made
State based on table if one made

Now the idea you had of using that table to pick the person was right but
you would use a query from the table to bring up the IDnumber and IDname

--
Let me know how you get on

Falty


mikeybikes said:
Hely Falty! Thanks you for responding soo quickly to my post. I'm not sure
if I understand correctly and maybe I'm not providing enough info. Please
forgive me for I am not that knowledgeable in MS Access. The IDNumber is the
first combox box on the form and it displays two columns, one showing the
actual IDNumber and the other showing the name. This is to give the user a
easy way to select the person desired. Those choices are being pulled from a
seperate table only containing those two pieces of data. However the form
itself has Title, First Name, Last Name, Job Location, Address, City, State,
etc. All of that info is to be saved in a seperate table. As you probably
may have figured out by now, I'd like that those empty fields (Title, First
Name, Last......) fill out automatically based on the IDNumber that I select
from the initial combo box. Now that I'm actually writing this out, I'm
begining to think that the table that contains the "IDNumber" and the
"IDName" should have these seperate fields included.



Falty said:
1. was answered by Scubadiver in a post not long ago

In the afterupdate event of the combo use

[textbox2] = [combobox].column(n)

where "n" is the column number for the description (zero is the first
column) and obviously change "textbox2" and [combobox] as appropriate

2. You could have that option open a form whose record source is bound the
table with its property set to data entry only


--
Let me know how you get on

Falty


mikeybikes said:
Hello to all! I'm in a bit of a bind and was hoping someone could answer my
question? I have created a database in access 2003 which consists of a few
forms. One of which has a filter on it based no the CaseNumber of the file.
Next to the CaseNumber I have an PersonID. The PersonID on the form is a
combo box that shows 4 individual names along with a last option for "Other".
I was wondering 2 things:

1. If I had selected a PersonID based on that combo box, how would I get
the PersonName textbox to fill out with the correct name based on the
PersonID?

2. PersonID has four ID numbers along with an option for "Other". If I
select "Other", how could I have the PersonName field come up blank for data
entry?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top