combo box and subform help

In my subform for each seperate order, I want to beable to select a 
descripton name from the combo box.  When the description name is selected, 
the price associated with that name should come up in the subform.  I have 
tried to put the combo box in the table for description and make a query 
but, the information associated with the description name will not come up. 


0
jtidwell
8/16/2007 1:08:30 PM
access.forms 6864 articles. 2 followers. Follow

1 Replies
768 Views

Similar Articles

[PageSpeed] 50

Create the combo box cboItem with the RowSource something like:

SELECT tblItem.ItemKey, tblItem.ItemDescription, tblItem.SellPrice FROM 
tblItem;

Set the number of columns to 3
Set the column widths to 0;2;0 or something else appropriate

Create the text box to hold the item price txtPrice:

In the Control Source of the txtPrice place:

=cboItem.column(2)


If the txtPrice Text Box is bound to a field then instead of setting the 
Control Source as above, in the  After Update event of the combo box place 
code similar to the following:

Private Sub cboItem_BeforeUpdate(Cancel As Integer)
Me.txtPrice = Me.cboItem.Column(2)
End Sub



"jtidwell" <jtidwell@triplettking.com> wrote in message 
news:%23QLbQaA4HHA.3916@TK2MSFTNGP02.phx.gbl...
> In my subform for each seperate order, I want to beable to select a 
> descripton name from the combo box.  When the description name is 
> selected, the price associated with that name should come up in the 
> subform.  I have tried to put the combo box in the table for description 
> and make a query but, the information associated with the description name 
> will not come up.
> 


0
B
8/16/2007 3:32:49 PM
Reply:

Similar Artilces:

subforms 01-31-08
Hi there Is there a way to change the layout of a subform? -- Thank-you! Ruth A subform is simply a form. You'd change its layout the same way you'd change any other form. Just note that you cannot open the form being used as a subform in design view if the parent form is open in normal view. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Ruth" <Ruth@discussions.microsoft.com> wrote in message news:CCAC541D-4CE7-4194-8701-27D06EB25402@microsoft.com... > Hi there > > Is there a way to change the layout of a subfor...

Can't get help for word macros
I am writing simple macros for Microsoft Word 2007. When I am in the document and want to work on the macro, I press Alt+F11 and that opens up the macro workarea. If I click on the “Microsoft Visual Basic Help” and enter almost anything, it is not found. I have even tried simple things like Save or File and they aren’t found. I have gone into Tools -> References and made sure things like “Microsoft Development Environment 8.0” and “Microsoft Development Environment VB .Net” are checked. I know I don’t have something set right but I can’t figure out what. Anyone have a...

Help with returning records given a date range
Hi there, I was wondering if anyone could give me some pointers as to where to start with the following? I have a spreadsheet of data in a table. One of the fields is date. I would like the user to be able to enter a date range and have all the records returned that fall within that range. What function should I use for that? DGET can only return one record. Could I use something like VLOOKUP in an array? The number of records returned will obviously change depending on the date range entered. Or, should I use something like a VBA loop? I need to do this in Excel - it can't be in Acce...

Help Rules don't work anymore
Hi: Is it just me? Why is it that on some days, my Outlook rules work, and on other days, they don't? On days when the rules don't work, if I run the rule(s) manually, it(they) works, but still don't work automatically? I'm really missing something! Outlook 2003 or XP Pro SP2 Thanks for any advice. -- Dab Cut off: yourhead to respond Try two things. 1) make sure your office product is up to date and 2) try a clean boot in Windows XP by disableing every thing during startup by using msconfig. If this works you may have a conflict with something that is loading ...

HELP dogs & cats in China please! [MUST SEE]
mms://a805.v9135e.c9135.g.vm.akamaistream.net/7/805/9135/0029/peta.download.akamai.com/9135/downloads/jcruel_china_dog_med.wmv ...

Emails in HELP DESK enviroment
The clients in this case are people working inside the same organization (using the same exchange) and when they opened a case the main comunication between Help desk and them is by email. But those emails are arriving to OUTLOOK and NOT to the CRM!! How can we change that?? We want to relate those emails to the correct case. The actual process is: 1. The request arrive by email to Outlook. Help Desk open a case and attach the email to it. 2. Help Desk send an email (from CRM) to the user with indications... 3. The user responde and send other email... (we are loosing this email in the ...

enabled/disable button off selection in combo box
Hello Everyone, I would like to be able to make a button only enabled when a particular selection is made from a combo box. I have done it before that it is only enabled when the combo box has an entry in it but is it possible to make it work only when say 1 of the 4 things in the combo box is selected but does nothing if any of the other 3 are chosen. I used this before in the After Update operativebutton.Enabled = Not IsNull(operativecombo) how can i make it do it with a field within the combo, is it something like (operativecombo.fieldID2)?? Thanks -- Message posted via AccessMonste...

Excel formual IF statement Help
I am trying to make this IF statement work =IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4="T"),B4,IF((A4="S"),C4,IF( (A4="M"),C4,IF((A4="L"),C4,IF((A4="H"),C4,IF((A4="G"),C4,IF((A4="C"),C4,"ERR") ))))))) On Sat, 01 May 2010 20:11:13 GMT, "Cerealkiller" <u59737@uwe> wrote: >I am trying to make this IF statement work > >=IF(A4="",0,IF((A4="F"),B4,IF((A4="D"),B4,IF((A4="T"),B4,IF((A4="S"),C4,IF( ...

Creating Drop Down boxes with the List function...
I am creating drop down boxes using the list function and I need to add color to the text. It will allow me to add color to the list, but the color I added doesn't appear in the drop down box. What do I need to do to make this happen? Thank you for your help. This should help, it sure did for me. http://www.contextures.com/xlDataVal10.html This should help you, I worked very well for me. http://www.contextures.com/xlDataVal10.html This should help you, I worked very well for me. http://www.contextures.com/xlDataVal10.html ...

I Need to create a criteria from a combo box that is on a datashee
Hi. I have a form in datasheet view. there's a combo named Hardwaretype and another one named hardwarename there's a relationship with this join type: one hardware type has many hardwarename. In a line of that datasheet view form if I choose monitors in hardwaretype comobox I want that in hardwarename combo only appeares the hardware that belongs to monitors, such as CRT; LCD. If the next line I choose Printers on hardwaretype and that the hardwarename combobox only shows me the hardware that belongs to prints. It's a criteria of what is choosed on hardwaretype. Is it po...

Command button that will unckeck all the ckeck box on my form.
Hi folks, I've a put a field name: merchandise received with the data type yes/ no in my table called: Tbl_Cedule And I dragged the yes/no field on my continuous form. Now, is there a way to a command button that will unckeck all the ckeck box on my form? if so, how can do that and where do I need to put the command button? Please be specific, I am beginner in this field. Thanking you all in advance for your help! Fred's On Tue, 11 Dec 2007 16:20:22 -0800 (PST), "Fred's" <frederic10_mess@hotmail.com> wrote: It's hard to be specific when you are not. The ge...

need help please
I am creating an html newsletter to email. This will be a template that will be sent to someone else who will open it outlook express through messaging\new message using. They will copy and paste text from word into the file. I want to create links at the top (news headlines) that link down the page to the story. They will create a different newsletter every week. In HTML I have used anchors to do this. For this job I need to do it in word. In word I have tried creating a hyperlink to headline and also cross-referenced to a bookmark. The hyperlink apears when the email is sent but...

Formula Bar
In my previous copy of Excel, when I typed in an equation in the Formula Bar, it would give me a little message window that showed where I was in a particular equation. Now that I have a another copy, I don't know what the "on" switch is for this function. Please help, it's driving me crazy when I create very long equations. Thanks, AK AK it was introduced with excel 2002, you turn it on/off under tools>options>general>function tooltips -- Regards, Peo Sjoblom "ak" <anonymous@discussions.microsoft.com> wrote in message news:BB2440A2-2883-4...

Newbie-Pls help me with DataBase Connection in EVC++.
Hi , I need some serious helping with this code.Could you please help me change my below given code from VC++ to EVC++.I know that i have to use CCeDBDatabase in place of CDatabase and CCeDBRecord in place of CRecordset but how to is the big Question. When i tried connection in EVC++ with CCeDBDatabase i dont get any errors but this window "Microsoft ODBC for Oracle Connect window" is missing.But i get MessageBox(L"The DataBase is now Connected!!!"); which i've given just below Open statement.I am emulating my EVC++ code into PPC2003, so i should be able to see "...

Help: Creating an MFC dll
Hi, I'm trying to create a dll with which I can link another application to. For starters I've added nothing to the dll. I selected MFCAppWizard (dll), Regular DLL with MFC statically linked, creating a project called DLL_TEST. I added nothing, then built my DLL_TEST.dll (which also created DLL_TEST.lib). Then I created a MFCAppWizzard (exe). I overid the New button to test my dll. void CMainFrame::OnFileNew(){ AfxMessageBox("Hello"); CDLL_TESTApp Test; } I added #include "DLL_TEST.h" to MainFrm.cpp. In the Project->Settings "Link" tab, I a...

Help with updating tables in many-to-many relationship
Hi, I am working on a database that contains a many-to many relationship. I created an intermediate (linked) table between the two primary tables. I have a Form1 that displays the info from Table1 and a control to open a Form2 that displays records from Table2 that match the Table1 record. Everything works great for displaying and editing information on Form2 except for when I try to add records. I don't seem to have the right code to update the Linked Table. Does anyone have some sample code that works? My tables include the following: Table1 Table2 ...

Help importing .dtf Please?
Is there any way to import a .dtf database info from Q&A DOS v5.0 into Excel? If anyone can lend a thought I would really appreciate it. I think I have to export because, since upgrading to WinXP - the client gets an error message in Q&A when trying to print lables. (it says not enough memory - but I know that's not it). Any help you can give would be wonderful. Thank you! V-ger What export options do you have in Q&A? Compare that list with the sorts of text files that Excel can handle, such as comma or delimited (tab, other character). On Mon, 15 Nov 2004 12:27:0...

Using SUMIF i want to say IF A=1 & B=2 then sum C any help pleas
I want to single out a sum that has two common detonators row A and B, IF row A=1 and row B=2 then sum row C Try this, adjust the range to match your data: =SUMPRODUCT(--(A1:A100=1), --(B1:B100=2), C1:C100) Does that help? -- "Actually, I *am* a rocket scientist." -- JB (www.MadRocketScientist.com) Your feedback is appreciated, click YES if this post helped you. "Peter" wrote: > I want to single out a sum that has two common detonators row A and B, IF row > A=1 and row B=2 then sum row C That's quite an explosive worksheet you have<...

Command Button to fill Subform Field
How do I get a command button on a mainform to input data into a subform. Essentially, I just want a command button on the top of the form (where all the data is being entered) to be available to the user to automatically add a date to one field and and disable another field. Both the date and the additional field are in a subform. But, I cannot seem to remember the code to point the action to the subform instead of the main form. Help? Jason Lopez The syntax is; Me![NameOfSubformControl].Form![NameOfControl] Keep in mind that the name of the subform control may or may not be th...

Help Please
I am using a vlookup to grab some data from a master list. My vlookup works fine but here is the dilemma: I am using a sheet that has retail items down the rows and divisions where certain items are authorized. Each item has various information including UPC numbers, which I am using for my vlookup. The dilemma/problem/@#!$%%$#@ is that in several instances there may be two or three lines of the item listed. What I get is say three rows with the same UPC but different points of distribution. Obviously the vlookup will only find the first instance of the UPC and give me back the values in tha...

Combo Box Search By Query
Hi All, Ive Created a Dialog Box With some tick box's and a Combo Box. the Dialog box aint quite working the way i would like it to. the dialog box will open a report which the report has a record source of the query. the tick box on is ment to Included Projects that have Maintenance assigned. but the tick box is set to a yes or no. and the query looks at this field the combo box is the same, the combo lists all the end clients, and it works if i select a client which is assigned to the project, in which case i could return 100 Starbucks Coffee. but lets say i just want to display al...

Help with clearing name history
When I start typing a name in the To... field, Outlook will automatically try to fill in the name and email address, which is cool, but I want to be able to clear a history of names that I no longer want to pop up. I tried clearing the *.NK2 files, but there are not any on my machine, even after showing hidden files. Any help would be appreciated. John If you're using Windows 2000 or XP, the .NK2 file will be in a hidden FOLDER (or a system folder) -- it's not necessarily a hidden FILE. It also helps to have file extensions showing in Windows Explorer. You can either del...

Pivot Table Error...Help!
Hi, I have created numerous pivot tables in my workbook. The refres function was working fine. A couple fo days have passed and now when go to refresh the tables i get the attached error. does anyone know how to fix this? thanks +------------------------------------------------------------------- |Filename: pivot.jpg |Download: http://www.excelforum.com/attachment.php?postid=2677 +------------------------------------------------------------------- -- molavi11 ----------------------------------------------------------------------- mo...

help reading xml doc
I'm new to XML, so please bear with me. I'm using XPathNavigator and XPathNodeIterator to return a set of xml nodes from a document that looks like this: <root> <book title="Some Title"> <chapter> <title>Chapter 1</title> <starting_page>34</starting_page> <number_of_pages>15</number_of_pages> </chapter> <chapter> <title>Chapter 2</title> <starting_page>50</starting_page> <number_of_pages>15</number_of_pa...

Need help communicating with device on COM1
Does anyone have any sample code for controlling a device attached to a COM port of a Win2K/XP machine? The modem code I have is from 1992 and doesn't seem to work very well. Thanks. -Bob Bob Phillips wrote: > Does anyone have any sample code for controlling a device attached to a COM > port of a Win2K/XP machine? The modem code I have is from 1992 and doesn't > seem to work very well. > Thanks. > -Bob > > This code was hacked out of a prototype terminal emulator I this any use? HANDLE m_hFile ; m_hFile = (CreateFile(_T("COM1:"), GENERIC_READ |...