Butonla Liste Açma

Katılım
2 Eylül 2005
Mesajlar
141
Excel Vers. ve Dili
Excel 2003 - Türkçe
Ekte yaptığım çalışmaya A - Z arası butonlar koyup, aradığım kişinin isminin ilk harfi olan butona bastığımda aynı harfle başlayan isimlerin sıralanmasını ve aradığım kişiyi tıkladığımda formda çıkmasını nasıl sağlayabilirim.

( Bu programı yaparken yaptıkları çalışmalarından esinlendiğim arkadaşlara teşekkür ediyorum )
 
Katılım
22 Ocak 2007
Mesajlar
815
Excel Vers. ve Dili
2003
cevap

access yardım+nortwind veritabanı+phone list formu senin istediğin onu incele


Function Customer_Phone_List_Alpha_Buttons()
On Error GoTo Customer_Phone_List_Alpha_Buttons_Err

With CodeContextObject
' Attached to the Customer Phone List form.
' Attached to AfterUpdate event of CompanyNameFilter option group.
If (.CompanyNameFilters = 1) Then
' Filter for company names that start with A, À, Á, Â, Ã, or Ä.
DoCmd.ApplyFilter "", "[CompanyName] Like ""[AÀÁÂÃÄ]*"""
End If
If (.CompanyNameFilters = 2) Then
' B
DoCmd.ApplyFilter "", "[CompanyName] Like ""B*"""
End If
If (.CompanyNameFilters = 3) Then
' C or Ç
DoCmd.ApplyFilter "", "[CompanyName] Like ""[CÇ]*"""
End If
If (.CompanyNameFilters = 4) Then
' D
DoCmd.ApplyFilter "", "[CompanyName] Like ""D*"""
End If
If (.CompanyNameFilters = 5) Then
' E, È, É, Ê, or Ë
DoCmd.ApplyFilter "", "[CompanyName] Like ""[EÈÉÊË]*"""
End If
If (.CompanyNameFilters = 6) Then
' F
DoCmd.ApplyFilter "", "[CompanyName] Like ""F*"""
End If
If (.CompanyNameFilters = 7) Then
' G
DoCmd.ApplyFilter "", "[CompanyName] Like ""G*"""
End If
If (.CompanyNameFilters = 8) Then
' H
DoCmd.ApplyFilter "", "[CompanyName] Like ""H*"""
End If
If (.CompanyNameFilters = 9) Then
' I, Ì, Í, Î, or Ï
DoCmd.ApplyFilter "", "[CompanyName] Like ""[IÌÍÎÏ]*"""
End If
If (.CompanyNameFilters = 10) Then
' J
DoCmd.ApplyFilter "", "[CompanyName] Like ""J*"""
End If
If (.CompanyNameFilters = 11) Then
' K
DoCmd.ApplyFilter "", "[CompanyName] Like ""K*"""
End If
If (.CompanyNameFilters = 12) Then
' L
DoCmd.ApplyFilter "", "[CompanyName] Like ""L*"""
End If
If (.CompanyNameFilters = 13) Then
' M
DoCmd.ApplyFilter "", "[CompanyName] Like ""M*"""
End If
If (.CompanyNameFilters = 14) Then
' N, or Ñ
DoCmd.ApplyFilter "", "[CompanyName] Like ""[NÑ]*"""
End If
If (.CompanyNameFilters = 15) Then
' O, Ò, Ó, Ô, Õ, or Ö
DoCmd.ApplyFilter "", "[CompanyName] Like ""[OÒÓÔÕÖ]*"""
End If
If (.CompanyNameFilters = 16) Then
' P
DoCmd.ApplyFilter "", "[CompanyName] Like ""P*"""
End If
If (.CompanyNameFilters = 17) Then
' Q
DoCmd.ApplyFilter "", "[CompanyName] Like ""Q*"""
End If
If (.CompanyNameFilters = 18) Then
' R
DoCmd.ApplyFilter "", "[CompanyName] Like ""R*"""
End If
If (.CompanyNameFilters = 19) Then
' S or Š (S hacek)
DoCmd.ApplyFilter "", "[CompanyName] Like ""[SŠ]*"""
End If
If (.CompanyNameFilters = 20) Then
' T
DoCmd.ApplyFilter "", "[CompanyName] Like ""T*"""
End If
If (.CompanyNameFilters = 21) Then
' U, Ù, Ú, Û, or Ü
DoCmd.ApplyFilter "", "[CompanyName] Like ""[UÙÚÛÜ]*"""
End If
If (.CompanyNameFilters = 22) Then
' V
DoCmd.ApplyFilter "", "[CompanyName] Like ""V*"""
End If
If (.CompanyNameFilters = 23) Then
' W
DoCmd.ApplyFilter "", "[CompanyName] Like ""W*"""
End If
If (.CompanyNameFilters = 24) Then
' X
DoCmd.ApplyFilter "", "[CompanyName] Like ""X*"""
End If
If (.CompanyNameFilters = 25) Then
' Y, Y, or ÿ
DoCmd.ApplyFilter "", "[CompanyName] Like ""[YYÿ]*"""
End If
If (.CompanyNameFilters = 26) Then
' Z, Æ, Ø, or Å
DoCmd.ApplyFilter "", "[CompanyName] Like ""[ZÆØÅ]*"""
End If
If (.CompanyNameFilters = 27) Then
' Show all records.
DoCmd.ShowAllRecords
End If
If (.CurrentRecord > 0) Then
' If records are returned for the selected letter, go to the CompanyName control.
DoCmd.GoToControl "CompanyName"
' Stop the macro.
Exit Function
End If
If (.CurrentRecord = 0) Then
' If no records are returned for the selected letter, display a message.
Beep
MsgBox "There are no records for that letter.", vbInformation, "No Records Returned"
' Show all records.
DoCmd.ShowAllRecords
' Press in the All button.
.CompanyNameFilters = 27
End If
End With


Customer_Phone_List_Alpha_Buttons_Exit:
Exit Function

Customer_Phone_List_Alpha_Buttons_Err:
MsgBox Error$
Resume Customer_Phone_List_Alpha_Buttons_Exit

End Function
 
Katılım
2 Eylül 2005
Mesajlar
141
Excel Vers. ve Dili
Excel 2003 - Türkçe
bu kadar hızlı cevap beklemiyordum teşekkürler, hemen inceliyorum
 
Katılım
2 Eylül 2005
Mesajlar
141
Excel Vers. ve Dili
Excel 2003 - Türkçe
Programı Biraz geliştirdim, ancak A - Z arası butonları eklemede sıkıntı yaşıyorum, Nortwind - Phone List - uygulamasını inceledim ama programıma aktaramadım bir türlü yardımcı olursanız sevinirim.

Yeni Programım ekte,

Yardımcı olursanız sevinirim..
 
Üst