473,626 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2231
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
automaticall y 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
automaticall y 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
3213
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 lost when they move to a new record. This seems to be the case when there are multiple users. When there is a single user using it, we don't seem to have that problem. It seems that we had this problem when we first converted from an MDB back end...
4
1706
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 alphabetically. Sometimes, this value happens to be on the top and SELECTED. The problem is that if this item is selected by clicking on it, in response to onChange I open a text field (so user can specify the value). If this field is automatically...
3
12961
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 to tell when people have added notes to a record. (this database contains 6000+ records) I want to set it up so that "Notes Update" is updated to the current date whenever someone actually enters data into, or modifies data in, the "Notes"...
3
4479
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 equipment separately. In the existing table there is a serial number field, which is indexed with no duplicates. In the new table there will be multiple entries which must be related to the individual piece of equipment which is entered in the...
6
1744
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 create a database in which _adding a new record automatically creates a new field in the table_ (ideally, deleting a record would also delete the field that was created when that record was added). Thus, the number of fields in the table would...
7
1464
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 browser page from the database program to hilite 'n copy the URL from the ADDRESS line of the browser, then back to the database again to paste the specific URL in the designated table field. That's getting old. Everybody thinks that two steps...
1
2048
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 priority (=1,2,3,etc.). What I'd like for it to do is automatically update rankings when a project rank is changed, a new project comes in, or a project is completed. For example, let's say there are 4 high priority projects. If High #2 is...
1
2552
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 database and issue, and I apologize for a bit lengthy. The coding is located in the Event Procedure on the "On Open" property of the {rptLetter}: Sub cmdPrint_Click() 'Check if no results in any field, if all missing 'inform user and exit...
2
2225
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 'Residential' customer AND they have had business with us during this past year. My report is based on a query. The query has two tables associated with it. One is tblClients which provides client name, account type and the other relevant mailing...
0
8192
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8637
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6119
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1504
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.