How to get one field to update based on a selection from a drop do

New to Access. I want to create a form that coworkers can use to lookup 
information in a database for inputting data into a PO as well as submit new 
records into the database. I want to have a control that is a combo drop down 
box where the can select a row from a list of items in a specified field and 
based on that selection it will update the below text box control with the 
corresponding data in the field next to it on the database. Make sense? 
Basically need to figure out how to update one control based on data selected 
from the drop down box control above it??? 
0
Utf
5/13/2010 3:56:01 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
581 Views

Similar Articles

[PageSpeed] 37

Private Sub YourComboBox_AfterUpdate()
  Me.TextBoxName = Me.YourComboBox.Column(X)
End Sub			

where the X is an integer designating the column of the combobox you want to
populate the Textbox. This is Zero-based, so reading the combobox Left-to-
Right, if you have, say, fields

PO_Num, Company, ContactName

and you wanted the textbox to be populated with the PO_Num, you'd use

Me.TextBoxName = Me.YourComboBox.Column(0)

For the Company name

Me.TextBoxName = Me.YourComboBox.Column(1)

And likewise, for the ContactName

Me.TextBoxName = Me.YourComboBox.Column(2)

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1

0
Linq
5/13/2010 5:56:17 PM
The standard search form is to use a combo. Allow the combo wizard to do that 
for you and select the field you want to search on. Then right click on the 
combo to get properties, go to events, and then select the afterupdate event. 
Type:
Me.filter = "[yourfieldyouaresearchingon] = """ % Me.combo# & """"
me.filteron = true
The combo# will be listed, like combo22 or combo10.
-- 
Milton Purdy
ACCESS 
State of Arkansas


"RMorton" wrote:

> New to Access. I want to create a form that coworkers can use to lookup 
> information in a database for inputting data into a PO as well as submit new 
> records into the database. I want to have a control that is a combo drop down 
> box where the can select a row from a list of items in a specified field and 
> based on that selection it will update the below text box control with the 
> corresponding data in the field next to it on the database. Make sense? 
> Basically need to figure out how to update one control based on data selected 
> from the drop down box control above it??? 
0
Utf
5/13/2010 6:31:01 PM
Reply:

Similar Artilces:

Inventory Transfer selecting incorrect stock items
Hello We are doing stock transfers and when we select items from the inventory list, it is putting a completely different item into the transfer????? I have re-indexed but it made no difference. -- Jenny ...

DST client update causing huge lag time in outlook2k3
I am the CRM Admin with 36 active clients who work remotely. We use CRM 3 SP1 Ver. 3.0.5300 w/ hot fix KB931270 and KB925874(DST) installed on both the client and Server. I run the offline version w/ sql 2005 express ver on my desktop. After the DST update was installed on my local desktop client My outlook would hang for from 30 seconds to 2 minutes trying to synch up with exchange. I recieve an error report from outlook saying that there are communication problems with exchange. The rest of the guys on the IT team check the Exc2k3 server and it is working flawlessly. I also have one ...

Global Fields in SQL tables
Does anyone know where do I find the global fields that are available in Report writer in what SQL database table? I need to know cause I need some of the global found in the Report Writer to insert them into a crystal report. Thanks in advance That depends on what field you are looking for. Which fields do you need? "ec" wrote: > Does anyone know where do I find the global fields that are available in > Report writer in what SQL database table? I need to know cause I need some of > the global found in the Report Writer to insert them into a crystal report. > &g...

why does excel ignore page formating after selecting rows to repe.
I have a Pivot table to which I wish to print excluding the "Page" items but include the Table headings. I have also set the document to print 1 page wide by up to 999 pages tall. It previews fine except for when I select the table headings (row $3$3) to be repeated at the top. After I make that selection, the preview shows all the data being printed on only 5 pages instead of 31. I don't know what I am missing to cause this unexpected result. ...

Some shared calendars do not reflect updates
Strange problem in Outlooks 2007 with Exchange 2007 hosted by Intermedia.net. We have a collection of resource accounts (meeting rooms) with shared calendars that we do bookings against. Some of these calendars refuse to update from cache unless we force an update with Shift+F9. Everything works fine if we turn off Cached Exchage Mode, of course, but operation becomes painfully slow. Deleting and rebuilding the .ost file does not help. Anyone else experiencing this? ...

Field Service Non-Inventory Parts
Ability to use non-inventory parts in the parts section of field service. Most parts we use for repair are non-stocking parts. Be useful to have the ability so you can track and transfer field service parts the same way you do regular parts. That way when you do a tranfer pick list to a service truck you can make sure you have a full list of needed parts, instead of a generated one for inventory parts, and some manual made up one for parts you don't stock ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To v...

How do you create dual drop down menus in excel 2000?
I can create a single drop down menu, but need to add a qualifier next to lists on menu. HELP!!!!!! If drop-down created with Data Validation>List, check out Debra Dalgleish's site for dependent lists. http://www.contextures.on.ca/xlDataVal02.html Gord Dibben Excel MVP On Tue, 11 Jan 2005 10:51:03 -0800, "Phlashh" <Phlashh@discussions.microsoft.com> wrote: >I can create a single drop down menu, but need to add a qualifier next to >lists on menu. HELP!!!!!! ...

UPDATE Table with multiple textboxes
I have three unbound textboxes on a form. Each textbox is used to input the amount of money A,B,C deposited. textbox1 is labeled A, textbox2 labeled B,.... When the user clicks a button, I need to update the table to add a row for A then add a new row for B and then C. Below is the code I have so far for the update, but I can't figure out how to repeat the update for B & C. Lastly, the table has a field named 'memo'. I would like to add the textbox caption to that field on each record. So, for the first record, the deposit field would be whatever num...

multiple 3D equations in one excel surface chart
hi all i'm trying to draw in excel multiple 3d equtions(x,y,z) inside of one excel surface chart does anyone have simple way of doing it i have the link for one equation chart but from there i'm little bit lost http://www.tushar-mehta.com/excel/charts/3d_surface/ What's the problem? If your data is of 3D type, just plot it as such. -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "thread" wrote: > hi all > i'm trying to draw in excel multiple 3d equtions(x,y,z) inside of one > excel...

data in single column split to multiple col's based on header
Hi All, I have data in three diff columns, e.g: column A column B column C 1 absman a 1 folklore b 2 internet c 2 absman d 3 folklore e 3 internet f I want these to be segregated under different heads based on the unique ID in column A with header (col B) and pull the data in Col C Result shld be something like this Headet absman folklore internet 1 a b 2 d c 3 Could ypu please help or I need to run vlookup by splitting the data, I have 17 million rows of data (split in 2 files) to be pulled under 16 heads. Your help in this regard is highly appreciated. -...

Automatic Calculation on only one Worksheet
Is it possible to have one worksheet in a Workbook calulate manually while all others automatically? The reason I would like this is I have a sheet which pulls in real-time market data that slows down my Workbook if calculation is on automatic for the workbook. If I turn off automatic calculation for the workbook then I end up spending a lot of time hitting F9 or shift + F9. Thanks No. But I do think you can with two instances of Excel. Just start another Excel -- Kind regards, Niek Otten "sfrancoe2" <sfrancoe2@discussions.microsoft.com> wrote in message news:CF6DE...

Adding Figures based on a different columns info
Dear Experts I have a workbook where row a = a number and row b = text ie gift, win, donation etc. What I am trying to achieve is to add all the gifts, all the wins and all the donations as seperate numbers, I could do this individually but as there are 500 plus rows it would seem sensible to try to have this formula driven Thanks in advance for any guidance Rgds Steve =SUMIF(B1:B500,"Gift",A1:A500) or if the text Gift is entered into cell C1, =SUMIF(B1:B500,C1,A1:A500) best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "wowster0&qu...

Combining fields into one
Hi all, I'm busy with an assett database to record all IT eqioment. I now have the following problem.. I have aa field called "speed" in which I type the speen of the CPU ie "2.4GHz" I'm a bit too lazy to type it 120 times so I created a table for it and think I have gone too difficult for myself. I wound up creating teo tables, one for the speed (called speed with speedid and speed and clockid) and another called clock (with clockid and clock) In speed I would only type the number and then have a drop down that looks up if it is KHz, MHz or GHZ from the cl...

[ANN] Share one account with multiple users and/or computers
PROBLEM: * You are in a situation where two or more people check the same account but have problems knowing who has acted on the message(s) or see a flagged message for your attention. This is further complicated by platform and email application (e.g. Outlook, Entourage and Apple mail). * You are the only user but access your account from multiple computers. Continue reading for the solution along with info on IMAP and POP accounts as well as IMAP providers: Share one account with multiple users and/or computers (The Entourage Help Blog) <http://blog.entourage.mvps.org/2009/01/share...

Getting to the last data row in a spreagsheet
Is there any way to find the last row with data in a spreadsheet from with VB? -- Jonathan Blitz AnyKey Limited Israel "When things seem bad Don't worry and shout Just count up the times Things have worked themselves out." Hi one way: dim rng as range set rng = ActiveSheet.Cells(Rows.Count, "A").End(xlUp) msgbox rng.value -- Regards Frank Kabel Frankfurt, Germany Jonathan Blitz wrote: > Is there any way to find the last row with data in a spreadsheet from > with VB? Jonathan, Try something like the following. Change RowNum to the desired row number...

SQL Question and Form Field Displays
Can some one please give me a bit of advice on how to accomplish the following: I have two tables (called Questions and Answers). The Questions table has five records, each with a unique question_Number field (from 1 - 5). I have created a query that pulls in all five Question records based on their primary key field and I am able to sequentially display all five records in my form. The Answers table has a single record that is associated with the records on the Question table by referencing the primary key field. The Problem: 1. I want the single Answer record to appear with each indivi...

How can I get the zero values at the end of a chart not to show?
I have a chart getting data from a spreadsheet, where data is added one day at a time, for an entire month. After adding the data for the first day, the data point shows, but the line connecting the data point in the chart immediately drops to zero, since data for the remaining days is not available. Is there a way to just have the line connecting the data points show only where there is data, and not show anything for the upcoming days where data is not available? Thanks. 1) use a dynamic chart - see http://www.stfx.ca/people/bliengme/ExcelTips/Dynamic.htm or 2) rather than blanks f...

Country, Phone and email showing inthe Bill to or Ship To fields
When we set a customer in Store Operations POS we need to verify some extra information in the Bill to and Ship to windows for shipping purposes. Is there a way to display the Country, Phone number and the email address in these windows? At the very least we need to be able to see the country. Had a similar issue a few months ago where I needed to see customer email, phone, available balance, and account number - but the white boxes "bill to" and "ship to" aren't editable, so I got assistance on this newsgroup (think it was Jerry Data - thanks Jerry) on editing...

Drop down boxes and linking to db
I am attempting to create a purchase order form and I would like in the ship to address to place a drop down box of all my suppliers. When the user clicks on the drop down box, a list of suppliers will appear. The user will then choose a supplier name and click on it. After clicking on it, I would like the form to automatically display the address, contact info. and other relevant information. I am lost as to how to do this. Thank you. Francis --- Message posted from http://www.ExcelForum.com/ You could use Data|Validation to show the list of suppliers. See Debra Dalgleish's sit...

Populating appropirate account in look up box when selecting contact
Hi There, I wonder anyone can point me in the right direction can help out there. We have a CRM Case form where it has Customer lookup field (Regarding lookup for Account/Contacts) and also Responsible contact lookup field (lookup for Contact records). What we want happen is as soon as Responsible contact is selected from a lookup, automatic population of appropirate Account in Customer look up field. We believe it should be possible because contacts in the system are already linked to Account records any help is much appreciated. cheers Kyaw Hi Kyaw, You will need to write a ...

How can I make a sheet display data from another sheet based on date criteria?
Hello, Say I have an Excel workbook with 3 sheets (sheet1, sheet2, sheet3). Each sheet has two columns (Date, Thing that happened on that date). I would like to know if there's a way to have a fourth sheet, called "on this date in history" (or whatever). It would consider today's date and display each thing that happened on todays date in previous years on each row. So basically, if I open the workbook on May 11th, 2007 and go to the fourth sheet, it would show me a list list of events that happened on May 11th in previous years, and it would update for each day that I vi...

Select a worksheet
I'm using the below formula to determine the specific type of equipment from a list named: database =IF(VLOOKUP($J$2,Database!$A:$U,21,FALSE)=$X$2,"Desktop",IF(VLOOKUP($J$2,Database!$A:$U,21,FALSE)=$X$5,"Notebook","Error!!!!!!!")) value of X2 = DSK and value of X5 = NBK What I need help with is a way of using the value returned to automatically open the relevant worksheet, ie: If "Desktop" is returned the Desktop worksheet needs to open and if "Notebook" is returned the notebook worksheet needs to open automatically. All wo...

UPDATE QUERY not updating data
Hi all, Is there something obvious I should know about or is it plain magic? I've got a Access 2000 file format database in Access 2003. I've got a table called [Jobs] and I'm developing a way to edit a Job. So I've created an identical table called [EditedJob]. After clicking EDIT I clear the table [EditedJob], then populate it with all the details of a current job and open a form frmEditJob which is bound to [EditedJob] table. Now, I am able to change all the details I want and when clicking "save" button I run this code: Dim qryUpdate As QueryDef Set qryUpdat...

GAL update #2
Instead of waiting until the following morning for the Group Contacts list to update where in system manger can you go and do an immediate update of your global address list? I suppose you meant Offline Address List (if you use Outlook 2003 with cache mode)... ESM/REcipients/Offline Address List/Default OAL -> right click Rebuild -- Regards, Sasa Milovanovic MCSE:Messaging sasa.milovanovic(at)exchangemaster.net "rmwatrich" <rmwatrich@hotmail.com> wrote in message news:%23v%23AYcTuFHA.992@TK2MSFTNGP12.phx.gbl... > Instead of waiting until the following morning ...

Products from different price lists in one order?
Hi Why the system allows me to enter produts from other price lists into one order (quote, opportunity) when i have a specific price list attached to it? I dont really want products from a dealer's price list to be sold to individuals. Is there a way to restrict this? thank you If you want a "dealer's" price list then you have to set that price list and then link it into that product via the Product's "Price List Items" Otherwise it will price at the "Default Price List" Good luck. Frank Lee Workopia, Inc. http://www.workopia.com/Links.htm S...