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  dBforums > PC based Database Applications > Microsoft Access > search criteria

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-26-12, 06:16
putadokta putadokta is offline
Registered User
 
Join Date: Jan 2012
Posts: 4
search criteria

Hi to one and all This is my first post here.. I hope that you can help me I am developing a database The database needs to list the records in a listbox and then when a record is clicked the details come up, The problem i have is I need a method for getting/filtering all the records that begin with First character into the listbox. I have 27 command buttons listed down the page from A-Z, when one is clicked the listbox needs to filter the Full name that begin with that letter
Any pointers or help would be much appreciated ACCESS 2010
Reply With Quote
  #2 (permalink)  
Old 01-26-12, 07:15
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
Every button could call a procedure like:
Code:
Private Sub SortForm(Byval FirstLetter As String)

    If Len(FirstLetter) > 0 Then
        strFilter = "SomeField LIKE '" & FirstLetter & "*'"
        Me.Filter = strFilter
        Me.FilterOn = True
    Else
        Me.FilterOn = False
    End If

End Sub
It's very difficult to be more specific without knowing anything about your database.
__________________
Have a nice day!
Reply With Quote
  #3 (permalink)  
Old 01-26-12, 08:49
putadokta putadokta is offline
Registered User
 
Join Date: Jan 2012
Posts: 4
Re search

What I am trying to achieve is instead of using a dropdown box all The time. Is when you click a button i.e 'P' just the Artists name appears in a list box or the dropdown box. Because when I have finished updating the records The dropdown box way is going to be to long to scroll. I am enclosing Database to see if you understand me And thank you for your reply
Reply With Quote
  #4 (permalink)  
Old 01-26-12, 09:01
putadokta putadokta is offline
Registered User
 
Join Date: Jan 2012
Posts: 4
database

The database Music_Access2010.zip
Reply With Quote
  #5 (permalink)  
Old 01-27-12, 23:47
putadokta putadokta is offline
Registered User
 
Join Date: Jan 2012
Posts: 4
problem solved
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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