Combo box display

Using A2K, I have 2 combo boxes on a continuous form, cboCompany and 
cboDescription.  After I make a selection in cboCompany, I would like to have 
only descriptions from cboCompany display for selection in cboDescription.  
In a query, I looked for descriptions from the form and cboCompany.  This 
works for the first occurrence of the continuous form, but the same 
descriptions are displayed for each additional line even if a new company has 
been selected on cboCompany.
How can I get this to work?
Thank,
Dan

0
Utf
1/14/2008 5:48:03 PM
access 16762 articles. 3 followers. Follow

2 Replies
354 Views

Similar Articles

[PageSpeed] 36

Hi danc09

After each selection of cboCompany you need to requery cboDecsription


In the properties box of cboDescription open the select query and enter the 
criteria :-

Forms!FormName.cboCompany

In the properties box of cboCompany
select "After Update" then select "Event Proceedure"

For the "Event Proceedure code enter the following command

Me.cboDescription.requery

Have fun

DeltaTech



"danc09" <danc09@discussions.microsoft.com> wrote in message 
news:E0A48C51-FDAF-4BAC-980E-CAD4F8678EA1@microsoft.com...
> Using A2K, I have 2 combo boxes on a continuous form, cboCompany and
> cboDescription.  After I make a selection in cboCompany, I would like to 
> have
> only descriptions from cboCompany display for selection in cboDescription.
> In a query, I looked for descriptions from the form and cboCompany.  This
> works for the first occurrence of the continuous form, but the same
> descriptions are displayed for each additional line even if a new company 
> has
> been selected on cboCompany.
> How can I get this to work?
> Thank,
> Dan
> 


0
DeltaTech
1/14/2008 6:08:31 PM
In the "after update" event of cboCompany change the "row source" of 
cboDescription to match the value in cboCompany. 

should look like :
me.cboDescription.rowSource = "Select [YourTableName].Description FROM 
[YourTableName] WHERE [YourTableName].CompanyName = '" & me.cboCompany.Value 
& "'"

Should do the tirck!

-- 
Yanick


"danc09" wrote:

> Using A2K, I have 2 combo boxes on a continuous form, cboCompany and 
> cboDescription.  After I make a selection in cboCompany, I would like to have 
> only descriptions from cboCompany display for selection in cboDescription.  
> In a query, I looked for descriptions from the form and cboCompany.  This 
> works for the first occurrence of the continuous form, but the same 
> descriptions are displayed for each additional line even if a new company has 
> been selected on cboCompany.
> How can I get this to work?
> Thank,
> Dan
> 
0
Utf
1/14/2008 6:17:01 PM
Reply:

Similar Artilces:

Linking drop down boxes #2
Gord Dibben and Dave Peterson Many thanks for the sound advice to visit Debra Dalgleish's site whic has proved most helpful. best wishes to you both Zaika : -- zaik ----------------------------------------------------------------------- zaika's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1590 View this thread: http://www.excelforum.com/showthread.php?threadid=27384 Zaika Thanks for the thanks. Gord....and for Dave also. On Sun, 31 Oct 2004 17:27:57 -0600, zaika <zaika.1f0kzz@excelforum-nospam.com> wrote: > >Gord Dibben and Dave Peterson &...

Edit Box carriage return
How do I add a carriage return and have it show up correctly in an mfc textbox? I need to edit the CString variable then updatedata and have it show multiple lines. The multiline option is selected. Use \r\n. "CodeTyro" <CodeTyro@discussions.microsoft.com> wrote in message news:819EB280-849A-4672-81C6-12DB72952B9B@microsoft.com... > How do I add a carriage return and have it show up correctly in an mfc textbox? I need to edit the CString variable then updatedata and have it show multiple lines. The multiline option is selected. ...

Text box
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) I am trying to print text that is in a text box but only the boarder of the box prints out. The text is visible in the normal view and in the print preview. First confirm that both Office & OS X are fully updated. Then check in Word> Preferences> Print to make sure that the boxes are checked for both "Drawing objects" & "Print background colors & images". Equally important: You should also have a look at the printer mfr's web site to see if you have the most current driver for you...

Publisher should have customizable text box shapes.
---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/community/en-us/default.mspx?mid=4e3276f3-4c7c-48e6-9580-3492276008c2&dg=microsoft.public.publisher You can insert text into autoshapes. -- Mary Sauer MSFT MVP http://office.microsof...

Forms Check Box cell link
Excel 2003 I am using a check box created with the Forms menu. I created a box over cell D4. Using the Format Control box, I linked the check box to cell D4. I want to copy the check box in cell D5, D6, D7,.... and I want the cell link to integrate in the same mannor; check box in cell D5 should link to cell D5, and so on. Is there a way to accomplish this short of going into the format control box and manually editing each cell link after I have copy and pasted several check boxes? I have NOT entered the link using an absolute cell referense. I got the idea for this from Dav...

Form Menu : Check Box
I am trying to enter 300 or so check boxes onto and Excel spreadsheet. I find that I can link the 'return' cell using the right click / Forma Control / Control tab / Cell Link option but I need to do this for eac box ! Is there a way around this ? Whereby I can create one Check Box an then drag or copy it down -- jagstirlin ----------------------------------------------------------------------- jagstirling's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=110 View this thread: http://www.excelforum.com/showthread.php?threadid=50634 Maybe you could jus...

disabling the Files type combo box
Hi All, My Visual Basic application is using Excel for reporting. I need to restrict the users of my application to open only excel files from the File->Open dialogue box. Or Is there any way to make default �Excel files (*.xls)� in the Files type combo box in the Open dialog box and disabling the Files type combo box, so that the users can only select excel files when they click File->Open. Please help me in this regard -- areddy ------------------------------------------------------------------------ areddy's Profile: http://www.excelforum.com/member.php?action=ge...

totals do not display unless user clicks on text box
I am relatively new to access. I am using access 2007 to create a report that contains subtotals. When the report is displayed on the screen the subtotals are blank. When the user clicks on the subtotal text box then the value appears. The user has to click on each subtotal in order to make the value appear. Has anyone experience this problem? Is there a workaround or solution? Thanks Normally a sub-total in a report is achieved by means of an unbound text box in a group footer with a ControlSource property which is an expression summing a set of values from the detail sect...

Font in Check Box
Is it possible to change the Font in a check box? If it's a checkbox from the control toolbox toolbar, you can go into design mode show the checkbox's properties double click on Font and change it. If the checkbox is on a userform (inside the VBE), you can show its properties and do the same thing. You also have another reply at your original post. Mon wrote: > > Is it possible to change the Font in a check box? -- Dave Peterson ...

Combo box returning wrong value
I am having trouble with a combo box, which is filled by a query to that displays two fields (Fund # and Fund description). The fields are unbound and I am using VBA to store the unbound fields in a table. I am using an option box to determine which sequence to use to present the data (I use two different queries and store one of them in the row source of the combo box, depending on the option box value). This all works fine. The problem comes when an item is selected. I would like to store the values both the Fund # and the Fund value in my table with VBA. My VBA code in the co...

Mail Box Size
Exchange 2000 SP3 + rollup. Is there a limit to the size any one user's mailbox?. I have a client with one user having a 6 Gig mail box. Yes, that is correct 6 GIG for one user. Thanks B the only limit is the limit of your store, ie if standard then 16GB(if hes the only user) enterprise = as much disk space as you have Bob wrote: > Exchange 2000 SP3 + rollup. Is there a limit to the size any one user's > mailbox?. I have a client with one user having a 6 Gig mail box. Yes, that > is correct 6 GIG for one user. > > Thanks B > > On Wed, 13 Jul 2005 ...

Help please using a combo box with a query instead of the usual wildcards etc.....
Hi, I have nearly finished my database and I would like to add a query that uses a combo box to get the results, not the usual paramater style input. I suppose it would need a form and a query and a combo box, but where to start !!!!!!!! Any kind soul out there that can give me an example of where to start..........? Many Thanks Joe Joe The generic approach you'd use is: * create a new form, add a combo box that is set to return the value your query would need * create your query ... in the criterion "cell", put a reference to the form's combo box's value: ...

Combo Box 12-26-07
Is there a way to have more than one bound column in a combo box? No. What is it you are trying to do? Perhaps we can offer a suggestion. -- Dave Hargis, Microsoft Access MVP "Sharon" wrote: > Is there a way to have more than one bound column in a combo box? On Wed, 26 Dec 2007 07:02:00 -0800, Sharon wrote: > Is there a way to have more than one bound column in a combo box? No. Now if you tell us why you think you need more than one bound column, perhaps some one can help with an alternative solution. -- Fred Please respond only to this newsgroup. I do not reply to pe...

Use combo to print report between two sets of dates
I am trying to print a report that shows timesheet entries for two sets of dates. The report also prints out based on the data entry person selected. The user selects their name and then uses another combo box to select pre entered dates. My code is as follows: Private Sub cboDates_Click() Dim stDocName As String Dim FromDate As Date 'Name of criteria start timesheets date field. Dim ToDate As Date 'Name of criteria end timesheets date field. Dim FromOTDate As Date 'Name of criteria start OT date field. Dim ToOTDate As Date 'Name of criter...

Outlook does not display all contact info...
I have MS Outlook 2002 on XP - and for some reason, not all of the information I have entered for a particular contact is automatically displayed - I have to actually open up the contact and get the info. Seems odd... and I have searched through the options, etc... but I haven't had any luck. Thanks in advance for the help. -Lee What view setting are you using on the contacts folder (View | Current View)? You may want to experiment with all the default views to see if any of them suit your needs, and if not, you can always create a custom view. -- Jocelyn Fiorello MVP - Outlook **...

How can I embed a font in an Excel text box?
...

Display Query from form in Foreground
I have a form upon which the user selects display, filter and sort fields. He then clics the submit button and a query is built and then displayed with the following code: DoCmd.OpenQuery "Queryname", acNormal, acEdit The query works but shows up in the background and cant be clicked on until the form is closed. The idea was to create a form on which the user could do adhoc queries until he gets it right and then click another button to do the Excel extract. Is there a way to show the query in the foreground? On Tue, 22 Jan 2008 17:54:27 -0800, rmcompute wrote: > I ha...

Display table name as field in query
Does anyone know if there is a way to display the table name as a field in a query? I have a UNION query that merges all of the records from 10 different tables, but I need a field that indicates which table each record comes from. Any help would be greatly appreciated. Thanks, Craig Craig wrote: >Does anyone know if there is a way to display the table name as a field in a >query? > >I have a UNION query that merges all of the records from 10 different >tables, but I need a field that indicates which table each record comes from. Just use the table name in a calcula...

RSG and a NAS box
Hi all I am running exchange 2003 sp1, what i want to know is if i have to restore a mailbox uisng the RSG, can i point or mount the RSG databse to a NAS box or another server other than exchange? What i am concerned about is if i have to restore a database from backup to the RSG, I might not have enough room on the server to hold the prodcution DB and the restored DB to the RSG. Also if i can mount the DB to a different box, then can i run exmerge on it and get the mail? Thanks a ton! On Wed, 23 Feb 2005 10:53:06 -0800, "Skipster" <Skipster@discussions.microsoft.com>...

Verticle Scroll Bar Not Displayed as Expected
I have a form with a text box. The text box properties are set to allow verticle scroll bars. The text box margins (L/R/T/B) are set to .02". This is to allow reading the entries easier. This is causing the scroll bar for the text box NOT to show, but when I set the margins to 0", the scroll bar appears. Is this a known bug? Any work-arounds? I've never had to use scroll bars, but I'm pretty sure I've seen here or elsewhere that the scrollbar will only appear if the data in the control is large enough to require the scrollbar in order to be viewed. Setting the ...

Display name points to the wrong user information
Hi, A client of mine is having problem with his user information in Outlook when sending out emails internally. Currently, they are running Exchange 2003 and Outlook 2003. This happened yesterday around 9am. When the user send an email to any internal staff, his user/contact information is stated as a different user. For example, my client's name is John Smith and the other account is TempStaff. 1. When he send out internal emails, other will see him as TempStaff in the From field. 2. When other users send him emails, other will see him as TempStaff in the To field. 3. On John Smith&...

Free/Busy information only displayed from 1/1/05 to 3/1/05
Since the beginning of the year, the Free/Busy window for almost ALL of my (800+) users is 'stuck' at 1/1/05 through 3/1/05. Most users publish 2 month's worth of free/busy from Outlook, so I should see one month prior to today's date and two months ahead. If a user increases the # of months published in outlook, the free/busy time is adjusted to 1/1/05 through the correct month, so I know that _some_ level of communication is happening between outlook and exchange. I run a mixed exch5.5 and exch2003 environment. Most clients are outlook 2000 or 2003. The problem oc...

Setting text color to black in inactive combo boxes
Hi, I have a dialog with several edits & combo boxes (and labels too). The data is shown for view only and i need it to be shown in black color (text). For the edits i use the read-only property and it's doing the job. With the combo's i have a problem, The text is displayed in gray no matter what... anyone? Thanks. yuval.gatenio@gmail.com wrote: > Hi, > > I have a dialog with several edits & combo boxes (and labels too). > > The data is shown for view only and i need it to be shown in black > color (text). > > For the edits i use the read-only...

Input box replace text in textbox
How can I modify the macro below with input box code to replace "2008" by "2009" using an input box - so that i can replace "2008" by "2010" more easily if required - thxs Sub masschange() Dim ws As Worksheet Dim longstr As String Dim i As Long For Each ws In ActiveWindow.SelectedSheets For Each shp In ws.Shapes 'shp.Select If shp.Type = msoOLEControlObject Then If TypeOf shp.OLEFormat.Object.Object Is MSForms.TextBox Then If shp.Type = msoOLEControlObject Then If TypeOf shp.OLEFormat.Obje...

Outlook 2003 not displaying downloaded email
I can send mail successfully with Outlook 2003...when I pull mail down, it appears that is processing mail from my ISP...but nothing is displayed in my Inbox??? I originally upgraded from office 2000 SR1. I have since uninstalled office 2003 Pro Enterprise, removed mail profiles...reinstalled Office 2003...resetup mail profile from scratch...still doesn't display downloaded mail? Delivery point is Inbox in current PST... There are no junk email rules set up or filters turned on? (that I can visibly see) Any ideas? Thanks in advance. Shawn Can you turn on diagnostic logging (see h...