473,379 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Automatically get data in field when picking something in other field

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
7 2218
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

32
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being...
4
by: Xerxes | last post by:
Hi, can I have a field automatically clicked by calling something like click()? I have a dropdown box, one of whose elements is "Others (Please Specify)". I list the dropdown boxes values...
3
by: BlackFireNova | last post by:
This concerns an Access 2002 (XP) database. There are two fields, "Notes" (Memo Field) and "Notes Update" on a form (among others) which I am concerned with here. Problem: I need to be able...
3
by: BlackFireNova | last post by:
I have an existing database, and I need to add another table to it. The database tracks equipment, however I have a need to track ancillary items which are purchased or added to some of the...
6
by: HD | last post by:
Hello. For the following, I would appreciate if anyone could tell me: if it can be done, how it might done, and/or what search terms I could use to find the solution myself. I would like to...
7
by: MLH | last post by:
We are constantly scouring the WEB for items for sale, copying and pasting descriptive information about the items into text and memo fields of MS Access tables. To date, we are going back to the...
1
by: prime80 | last post by:
I'm building a project database to keep track of the various engineering projects ongoing in our department. These projects will be grouped by priority (=High, Medium, Low) and ranked within the...
1
by: Curtis | last post by:
I am having a problem with the coding below that someone was trying to help me with in another website. I have been to several websites and hopefully here I can get it resolved. I inherited this...
2
by: Jimmy Stewart | last post by:
Ok, I'm trying to write a query that is starting to wear me down. What I'm trying to do is create a year end report that gets sent to all of my customers who meet two criteria. One they are...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.