A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Box Search



 
 
Thread Tools Display Modes
  #1  
Old April 15th, 2010, 08:17 PM posted to microsoft.public.access.forms
Mark
external usenet poster
 
Posts: 1,534
Default Combo Box Search

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.
  #2  
Old April 15th, 2010, 08:32 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Combo Box Search

"Mark" wrote in message
...
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)

  #3  
Old April 16th, 2010, 04:24 PM posted to microsoft.public.access.forms
Ash222
external usenet poster
 
Posts: 1
Default Combo Box Search

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" wrote in message
...
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)

  #4  
Old April 16th, 2010, 08:27 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Combo Box Search

"Ash222" wrote in message
...
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)

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.