Combo box to find records

Hi,  need help with what I am sure is a simple problem.

I have a form and wish to find records using a combo box.  Which I know how 
to do.  The problem is it takes me to "one" record.  I would like to select, 
for example, employee name:  John Smith and it return all records for John 
Smith while filtering out all other records.  

I would be thankful for any help.

Thanks,
Michael
0
Utf
1/31/2008 4:24:04 AM
access.forms 6864 articles. 2 followers. Follow

1 Replies
1912 Views

Similar Articles

[PageSpeed] 32

On Wed, 30 Jan 2008 20:24:04 -0800, Michaelchessking
<Michaelchessking@discussions.microsoft.com> wrote:

>Hi,  need help with what I am sure is a simple problem.
>
>I have a form and wish to find records using a combo box.  Which I know how 
>to do.  The problem is it takes me to "one" record.  I would like to select, 
>for example, employee name:  John Smith and it return all records for John 
>Smith while filtering out all other records.  
>
>I would be thankful for any help.
>
>Thanks,
>Michael

Try setting the Form's Filter property. Since you don't name the combo box, or
give us any indication of your tablenames or fieldnames it's a bit hard to be
specific, but try something like this in the combo box's AfterUpdate event:

Private Sub cboMyCombo_AfterUpdate()
Me.Filter = "[EmployeeID]  = " & Me!cboMyCombo
Me.FilterOn = True
End Sub


             John W. Vinson [MVP]
0
John
1/31/2008 6:22:28 AM
Reply:

Similar Artilces:

how to find product keys for office home and student 2007'trial'
i've just bought a new emachine with a pre installed 60-day trial of office home and student 2007. i'm being prompted to enter a product key but have never been able to locate it. "willibaba" <willibaba@discussions.microsoft.com> wrote in message news:39E04EA3-7757-43B4-B837-EB99C3AE6BBF@microsoft.com... > i've just bought a new emachine with a pre installed 60-day trial of > office > home and student 2007. i'm being prompted to enter a product key but have > never been able to locate it. From this MS Support page: http://support....

Unable to report selected records in Contact and Account
Hello, I have a very strange problem. I have to make a report from the entity Contact (and Account). I have maked a report in Visual Studio 2005. When I run the report on selected records then I get a blank report-screen. When I do exact the same on an own/new entity then it works fine. Can anyone help me? Thanks in advance, Dirk ...

Finding out what users are signed into GP 9.0
I need to find out what users are signed into GP 9.0. Is there any way to find that out through the GP 9.0 front end or do I have to go to the server? Thanks. -- Dave Christman System Developer Tools --> Utilities --> System --> User Activity -- Elisabeth "Dave Christman" wrote: > I need to find out what users are signed into GP 9.0. Is there any way to > find that out through the GP 9.0 front end or do I have to go to the server? > Thanks. > -- > Dave Christman > System Developer ...

Find maximum across multiple sheets
Hi all, I'm having alot of problems trying to summerize some data that I have on multiple sheets. I have set up a sheet called Cases that has an index of all the data sheets (i.e. 1, 2, ...) and would like to iterate through this list and find the maximum values and report them on my summary sheet. I would also like to report the sheet that has that maximum value. To complicate things a bit more, the ranges (i.e. 1!Data, 2!Data, 3!Data, ...) are defined as dynamic ranges. The structure and behaviour would look like something like this: SHEET: Summary item id | max value | max sheet 1 ...

Using FIND on linked text
I have a column linked to display the text strings in another column on another worksheet. Because the actual entry in the cell is a formula and not the text string, the FIND command doesn't work. Is there a way to search the displayed strings, rather than actual cell entries? Ed Ed In the Find dialog, change the 'Look In' to Values. Andy. "Ed" <ed_millis@removethis.hotmail.com> wrote in message news:O21RWV7SDHA.3700@tk2msftngp13.phx.gbl... > I have a column linked to display the text strings in another column on > another worksheet. Because the actua...

Excel 2000: Combo box cell link protection question
If the cell to which a combo box "cell link" refers, is protected then Excel generates an error when the combo box value is changed. Is there a way to to have the particular cell protected and yet be able to change the combo box value? Bertus Have the unprotected cell in a hidden row or column -- Message posted from http://www.ExcelForum.com ...

My spell check isn't finding misspelled words. What do I do?
It seems like the spell check feature is turned off. How do I get it to work? Why did it suddenly stop spell-checking? Check to make sure it is turned on. Go to Tools, Options, Spelling & Grammar tab, and under Spelling make sure the options you want are checked. Click okay. If it doesn't activate right away, close and reopen your document. "injurylawyer" wrote: > It seems like the spell check feature is turned off. How do I get it to > work? Why did it suddenly stop spell-checking? The two most common reasons (that I've seen) are that (1) the...

Help: New dialog box when opening Word
Starting in the last week or so I get the following message when opening Word or Outlook (which I have set to use Word as my mail composer): ------------------------------------------------------------------------------------------------------------ The document contains macros. Macro language support is currently disabled. Features requiring VBA are not available. Would you like to open this document read-only? OK Cancel Help ------------------------------------------------------------------------------------------------------------- I am not opening a fil...

How to find which column or row the Min() value is coming from
My data are in 19 columns and 600 rows. I need to find the minimum value in each row. At the top of the columns are descriptions (e.g. Pen A, Pen B...). I want to see which column ("Pen X") the minimum for that row came from. I can get the minimum value in the row using min(), but it is the min value I need, but the column name that has that value. I have searched for two hours and cannot figure out how to do this! Can anyone help? Thanks. Luanne wrote: > My data are in 19 columns and 600 rows. I need to find the minimum value in > each row. At the top of the co...

Input boxes in excel and MS Query
I'm using MS Excel to display the results of a SQL Server database, using the GET EXTERNAL DATA wizard, which then takes you to Microsoft Query so you can set up the SQL coding. I was having difficulty writing the SQL using MS Query, so I set up the same scenario in MS Access to write a query, then just pasted the query into MS Query. Unfortunately the code does not work and I get a "Invalid column name What is the start date" error What I'm actually trying to do is get two input boxes to appear each time the spreadsheet is opened. The user types the FROM and TO dates in...

Excel vba Form & Combo Box question
I want to show a list of descriptions in a combo box on a form. When the user makes a selection I want to put an associated data value into a cell... My descriptions are in.. A1 thru A5 The corrosponding data are in B1 thru B5 I want the data to go into cell C4 This code will put the description into C4... Sheet1.Range("C4").Value = cbxCity.Value I've tried to figgure out how to use the ListIndex property to Offset or Index but vba doesn'w use Offset and Index like the spreadsheet does. Can any one give me any help on this?? thanks tmb tmb, You can use something ...

Combo box value does not update in Excel 2007
I inserted a combo box form control in a cell and found problems with changing the value. Another cell on the worksheet contains a formula using the value in the combo box. When I selected a new value in the combo box and recalculated the formula it used the old value in the combo box rather than the new one. I noticed that when I used the arrow keys to navigate back to the cell containing the combo box the formula bar showed the old value, even though the combo box in the cell showed the new value. Am I doing something wrong, or is Excel not behaving as it should? bum...

Find cell contents in range
Hi, i am really struggling to create a macro to carry out the following. ( i am quite new to this and presently using a book but things are explained fully!) lets say cell K12 = 2245 i have a range of A2:A50 containing a list between 2220 & 2270 i need my macro to look at the value of K12. Find that value in range, and make the cell with that value active so in my list between 2220 & 2270 is an activecell where the value is 2245 i hope this can be done and hope that someone can help me. Regards, Nigel With Worksheets(1).Range("A2:A50") Set cell = .Find(Range(&quo...

Message Boxes
Hi there I am having a play around with message boxes and need a little help. I know how to show a message box that displays YES NO CANCEL. what I don't know how to do is get the YES NO working. I would like YES to save the workbook and close. No to unhide a sheet. Is this possible to do without having to use a userform? Thank you ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Business Software Galore! Free Excel Forum http://www.ozgrid.com/forum *** Hi Sub test() Select Case MsgBox("Pick one", vbYesNoCancel, "Yo!") Case vbYes Ms...

Finding Number of cells in a column of other sheet having a specific word in them
Hello , I would like to get the data,the number of cells in column H of sheet2 with value "open" in them, into one of the cell of sheet1. I tried to use COUNTIF(SHEET2!H:H,"open") ..but it is giving error. Please help me out .. Thanks in advance. Raja Shekar Your formula works for me. What is the actual error that youm are getting, #Value! #Ref! or what? -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings sandymann2@mailinator.com Replace@mailinator.com with @tiscali.co.uk <ch.rajashekar@gmail.com> wrote in message news...

Find string within a text in VBA
HI, How can I find a specific string in a text within a VBA code. Fo example - to search "Japan" in "the capital of Japan is Tokyo" an receive "TRUE" if found and "FALSE" if not.. Thanks -- Message posted from http://www.ExcelForum.com One way: Dim bFound As Boolean bFound = InStr("the capital of Japan is Tokyo","Japan") > 0 In article <neta.19h3rx@excelforum-nospam.com>, neta <<neta.19h3rx@excelforum-nospam.com>> wrote: > HI, > > How can I find a specific string in a text within a VBA ...

How do I stop the hover on text boxes in my newsletter?
I am creading a newsletter with publisher. It looks great but after I send it my recipients see a hover test box over the actual text box on my newsletter. What am I doing wrong? I am sure it is something simple but I just can't seem to figure it out. Thanks. ...

how can I find out trace dependents on other pages
I want to find out trace dependents, how can I find out trace dependents on other pages? -- PETER After clicking Tools > Formula Auditing > Trace Precedents/Dependents, if you were to double-click on the dotted arrow that points to a mini sheet icon, that'll bring up a "Go To" dialog to navigate to either the precedent(s) / dependent(s) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Peter" <peter.oellinger@t-online.de> wrote in message news:7280B569-F4B6-4EB4-A79A-6852BAF7949E@microsoft.com... >I want to find out trace depen...

Help Index & find?
Doesn't Office have a help index? I want the normal kind of help we've always seen in Windows where you could type in index words and search the whole help file. ...

Combo Box List
This is the code I have for a combo box, Private Sub ComboBox1_GotFocus() With ComboBox1 .Text = "Select Dimension" .AddItem "Weight" .AddItem "Flange Thickness" .AddItem "OAL" .AddItem "Body Length" .AddItem "Counter Bore" End With End Sub For some reason, the drop down menu lists these five options seven times over. I'm new to VBA, why is this. You probably want to Clear the combobox before adding items to it. .Clear -- Cordially, Chip Pearson Microsoft MVP - Ex...

Searching for text boxes
Is there a way to search for text boxes within a word (Microsoft Office Professional Edition 2003 version) document? Searching for "graphics" does not do the trick. I can't find anyone who can figure this out. Thank you! What do you want to do when you find them. Running the following macro will find them Dim i As Long With ActiveDocument For i = 1 To .Shapes.Count If .Shapes(i).Type = msoTextBox Then .Shapes(i).Select MsgBox "The selected shape is a text box." End If Next i End With -- Hope t...

How to kill a dialog box frm a class which has created by another
Hi , I am new to VC++ MFC programming. Can anybody help me? My application creates a pop-up dialog which has associated with the class called "CTakeBills". This basically displays a dialog box which has only Ok button and a disabled close button. There is a setTimer method in OnInitDialog() method of this class with a timeout of 250ms but there is no method called OnStopTimer or killTimer methods. I have another class called CCmdProcessor. My requirement is that i need to kill that dialog box programatically from this class(CCmdProcessor)which has been poped-up/created by anot...

Duplicate records
I am getting the "Duplicate Record" error when converting a lead to an account and a contact or to ands account, contact and opportunity. But I don't get the error when the other combinations are tried. ...

What's the best way to find out if user is currently using mailbox ?
on Exch2000Sp3, I go to Systems Manager and I see mydomain\certain user mailbox. Last logoff time = blank. As an example, I compare my logoff information: my Outlook is currently opened but my logoff time = 10/07/04, 9:00AM Are those info reliable indicators of current mailbox activity ? Please advise. If policy allows, examine the sent items folder. -- regards, Michael Abbaticchio MVP for Microsoft Exchange Server http://mvps.org/exchange "Marlon Brown" <marlon_brown@hotmail.com> wrote in message news:%23%23LdPdMrEHA.4008@TK2MSFTNGP14.phx.gbl... > on Exch2000Sp...

get random record in form
I have prepared a online test portal in MS access for 25 users. Users login & they give test. All of them access same question master and receive questions in their respective forms. What i wish to do is i wish that every body gets records in random manner. Idea is every body needs to solve ten questions from the question master but the sequence should be different for all. Can we do it using query or we need to write some macro.. Hope the problem is clear.. Kinldy help.. thanks a lot.. Boss hi, Boss wrote: > What i wish to do is i wish that every body gets records in ran...