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

Automatically get data in field when picking something in other field

P: n/a
Hello,

I have a database set-up with a form and two subforms in it. I have one
of the subforms (replacement parts) set-up where you can pick part
numbers from a drop down box and also pick a description of the part
from a drop down box. These are two separate fields. I want to be able
to pick the part number and have it put in the description
automatically or the other way around. Which ever would by easier?

I have a table with just the part numbers and descriptions. Then I have
it adding this info into a main table in relation to the serial number
of the machine getting the replacement parts. Please help,

Nov 13 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On 15 Dec 2004 07:14:05 -0800, jb******@acecwi.com wrote:
Hello,

I have a database set-up with a form and two subforms in it. I have one
of the subforms (replacement parts) set-up where you can pick part
numbers from a drop down box and also pick a description of the part
from a drop down box. These are two separate fields. I want to be able
to pick the part number and have it put in the description
automatically or the other way around. Which ever would by easier?

I have a table with just the part numbers and descriptions. Then I have
it adding this info into a main table in relation to the serial number
of the machine getting the replacement parts. Please help,


Hi
Not sure I understand this. If you have a table with fields PartNumber
and Description, and you have a combo box called combo1 which shows
PartNumber in the first (bound) column and Description in the second,
then when you pick a line combo1 will hold the value of PartNumber and
combo1.Column(1) will hold the value of the corresponding Description.
(Column numbering starts at zero).
David
Nov 13 '05 #2

P: n/a
I have a spot in a form and I want to pick an item from a drop down
list. Then after I pick that Description I want the next spot In the
form to auto fill in with the part number. My people know the
description but we don't have all the part numbers in our heads. So if
it would fill in after they pick the description.

David Schofield wrote:
On 15 Dec 2004 07:14:05 -0800, jb******@acecwi.com wrote:
Hello,

I have a database set-up with a form and two subforms in it. I have oneof the subforms (replacement parts) set-up where you can pick part
numbers from a drop down box and also pick a description of the part
from a drop down box. These are two separate fields. I want to be ableto pick the part number and have it put in the description
automatically or the other way around. Which ever would by easier?

I have a table with just the part numbers and descriptions. Then I haveit adding this info into a main table in relation to the serial numberof the machine getting the replacement parts. Please help,

Hi
Not sure I understand this. If you have a table with fields

PartNumber and Description, and you have a combo box called combo1 which shows
PartNumber in the first (bound) column and Description in the second,
then when you pick a line combo1 will hold the value of PartNumber and combo1.Column(1) will hold the value of the corresponding Description. (Column numbering starts at zero).
David


Nov 13 '05 #3

P: n/a
jb******@acecwi.com wrote:
I have a spot in a form and I want to pick an item from a drop down
list. Then after I pick that Description I want the next spot In the
form to auto fill in with the part number. My people know the
description but we don't have all the part numbers in our heads. So if
it would fill in after they pick the description.


You are not going to fill in *both* parts of information in that table,
are you? I may suggest you use two comboboxes, both on the article
number, both two-column, the one showing the description, the other
showing the part number.

Do you wish more detailed instructions?

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #4

P: n/a
When the form is up I want to fill in one part and then have the other
part fill in auto. So when I choose description form a drop down then
as soon a I choose it the part number fills in another field auto. Yes
please step by step directions.

Nov 13 '05 #5

P: n/a
jb******@acecwi.com wrote:
When the form is up I want to fill in one part and then have the other
part fill in auto. So when I choose description form a drop down then
as soon a I choose it the part number fills in another field auto. Yes
please step by step directions.


To enter the part number into the table, whereas the user sees the
description, you use a combobox.
Set its controlsource (that is what it stores and retrieves) to the part
number field.
Its rowsource (that is what you see on dropdown) becomes a two column
query, tapping on the product description table. First column is the
part number, second column the description. Be sure to set the Columns
property to 2.
Now, set the ColumnWidths property to 0. That means you hide the first
column.

When you want to see the part number, as well as enter it by
description, you add another combobox--or simply another text
field--with the part number as its controlsource.
You can set the control Locked (optionally Not Enabled) if you don't
want to bother/confuse the user by providing two inputs for one item of
information. I think you should do that. OTOH I like numbers and would
certainly appreciate the ability to also enter by product number.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #6

P: n/a
That works out good.

Now I have a combo box that has part number and description to choose
the part number field. When I choose one it only lists the part number
in the field (this is what I want).Then I have the same but turned
around to choose the description field. When I choose one it only
enters the description. (this is what I want) Good so Far.

Is there a way that I can only have one combo Box with the part numder
and description to choose the part number field and then have Access
fill in the description field for me without having to go to the next
combo Box and choosing again to enter in the description field. If not
that is fine. This works pretty good. If there is though I could choose
this once and have it fillin the descripton, price, bin #, ext.
Automatically by just choosing from the combo box I created.

Nov 13 '05 #7

P: n/a
jb******@acecwi.com wrote:
That works out good.

Is there a way that I can only have one combo Box with the part numder
and description to choose the part number field and then have Access
fill in the description field for me without having to go to the next
combo Box and choosing again to enter in the description field.


Yes.

Have the form open in design view and select the first combobox. View
its properties, tab Events. At OnClick, select the value [Event
Procedure] from the list. Click the button with three dots.

You arrive at the code module of the form. At the white line, type

me.recalc

I think that is all it takes to recalculate the second combobox.
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.