PC Review


Reply
Thread Tools Rate Thread

Combo Box Search

 
 
Mark
Guest
Posts: n/a
 
      15th Apr 2010
Hi

I am fairly new to access and have just created a large database for work.
The only way I have found to search the records is through a combo box. I am
trying to browse people by surname. I have four people by the last name barry
now if i select the 3rd record in the list it takes me to the first record
everytime. Is there anyway to change this?

Also I would like the drop down box to appear when you type like in facebook
and not once I have clicked the arrow is this possible.
 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      15th Apr 2010
"Mark" <(E-Mail Removed)> wrote in message
news:FB0916D4-F3E8-4F91-8076-(E-Mail Removed)...
> Hi
>
> I am fairly new to access and have just created a large database for work.
> The only way I have found to search the records is through a combo box. I
> am
> trying to browse people by surname. I have four people by the last name
> barry
> now if i select the 3rd record in the list it takes me to the first record
> everytime. Is there anyway to change this?


The combo box can't distinguish records that are identical in the displayed
column. So you need to make that column not have any identical values. Set
the combo box's RowSource to a query that creates a calculated field
including last name, first name, and (if desired) middle initial. For
example,

SELECT ID, LastName & (", "+FirstName) As FullName
FROM Contacts
ORDER BY LastName, FirstName

> Also I would like the drop down box to appear when you type like in
> facebook
> and not once I have clicked the arrow is this possible.


I'm not sure what you mean, not being a FaceBook user, but you can make the
combo box drop down when it gets the focus, using code for its GotFocus
event. For example,

Private Sub cboYourComboName_GotFocus()

Me.cboYourComboName.DropDown

End Sub


--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

 
Reply With Quote
 
Ash222
Guest
Posts: n/a
 
      16th Apr 2010
Hi Dirk - I have a similar situation that I was wondering if you could help
me on. I have a database of suppliers and I need a search capability on the
form that shows only the suppliers that meet a search criteria. Ex. shows
only suppliers with "Active" status. Any ideas? I've tried to put a combo
list box in the form, but as you said below it does not eliminate the
duplicates.

Thanks!

"Dirk Goldgar" wrote:

> "Mark" <(E-Mail Removed)> wrote in message
> news:FB0916D4-F3E8-4F91-8076-(E-Mail Removed)...
> > Hi
> >
> > I am fairly new to access and have just created a large database for work.
> > The only way I have found to search the records is through a combo box. I
> > am
> > trying to browse people by surname. I have four people by the last name
> > barry
> > now if i select the 3rd record in the list it takes me to the first record
> > everytime. Is there anyway to change this?

>
> The combo box can't distinguish records that are identical in the displayed
> column. So you need to make that column not have any identical values. Set
> the combo box's RowSource to a query that creates a calculated field
> including last name, first name, and (if desired) middle initial. For
> example,
>
> SELECT ID, LastName & (", "+FirstName) As FullName
> FROM Contacts
> ORDER BY LastName, FirstName
>
> > Also I would like the drop down box to appear when you type like in
> > facebook
> > and not once I have clicked the arrow is this possible.

>
> I'm not sure what you mean, not being a FaceBook user, but you can make the
> combo box drop down when it gets the focus, using code for its GotFocus
> event. For example,
>
> Private Sub cboYourComboName_GotFocus()
>
> Me.cboYourComboName.DropDown
>
> End Sub
>
>
> --
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)
>

 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      16th Apr 2010
"Ash222" <(E-Mail Removed)> wrote in message
news:A9C36B68-F036-4CB0-944E-(E-Mail Removed)...
> Hi Dirk - I have a similar situation that I was wondering if you could
> help
> me on. I have a database of suppliers and I need a search capability on
> the
> form that shows only the suppliers that meet a search criteria. Ex. shows
> only suppliers with "Active" status. Any ideas? I've tried to put a combo
> list box in the form, but as you said below it does not eliminate the
> duplicates.



I'm not sure what you have in mind. Are you wanting to build a combo box
that always lists only active suppliers? Or do you want to control what the
combo box shows -- active, inactive, or all suppliers -- according to some
other control? Or, a third possibility, do you want to list all suppliers,
but have the list entries be marked as to whether the supplier is active or
inactive?

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box - Search marf Microsoft Access 1 10th Jun 2008 10:30 PM
Combo Search Box =?Utf-8?B?YmxhZGVsb2Nr?= Microsoft Access 3 15th Mar 2007 06:08 PM
Error in my Search By - Search For Combo Boxes =?Utf-8?B?Q3VydGlzIFN0ZXZlbnM=?= Microsoft Access VBA Modules 3 9th Mar 2006 08:09 AM
Search Criteria: Two combo boxes: Issue with second combo Lance Microsoft Access Forms 0 21st Oct 2005 03:21 PM
search button to report based on multiple combo boxs ( combo criteria based upon queries ) kupppppz@gmail.com Microsoft Access Forms 6 5th Oct 2005 05:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:49 PM.