kusura bakmayın eksik kopyalanmış
Private Sub ac_firma1_GotFocus()
SqlKrt1 = IIf(Len(Me.ac_firma1) > 0, ", " & Me.ac_firma1, "") & _
IIf(Len(Me.ac_firma2) > 0, ", " & Me.ac_firma2, "") & _
IIf(Len(Me.ac_firma3) > 0, ", " & Me.ac_firma3, "")
SqlKrt1 = Mid(SqlKrt1, 2)
SqlKrt1 = IIf(Len(SqlKrt1) > 0, " WHERE ((tbl_firmalar.[firma-id]) Not In (" & SqlKrt1 & "))", "")
SqlSec = " SELECT tbl_firmalar.[firma-id], tbl_firmalar.firma_adi, tbl_firmalar.firma_adresi FROM tbl_firmalar" & SqlKrt1
Me.ac_firma1.RowSource = SqlSec
End Sub
Private Sub ac_firma2_GotFocus()
SqlKrt1 = IIf(Len(Me.ac_firma1) > 0, ", " & Me.ac_firma1, "") & _
IIf(Len(Me.ac_firma2) > 0, ", " & Me.ac_firma2, "") & _
IIf(Len(Me.ac_firma3) > 0, ", " & Me.ac_firma3, "")
SqlKrt1 = Mid(SqlKrt1, 2)
SqlKrt1 = IIf(Len(SqlKrt1) > 0, " WHERE ((tbl_firmalar.[firma-id]) Not In (" & SqlKrt1 & "))", "")
SqlSec = " SELECT tbl_firmalar.[firma-id], tbl_firmalar.firma_adi, tbl_firmalar.firma_adresi FROM tbl_firmalar" & SqlKrt1
Me.ac_firma2.RowSource = SqlSec
End Sub
Private Sub ac_firma3_GotFocus()
SqlKrt1 = IIf(Len(Me.ac_firma1) > 0, ", " & Me.ac_firma1, "") & _
IIf(Len(Me.ac_firma2) > 0, ", " & Me.ac_firma2, "") & _
IIf(Len(Me.ac_firma3) > 0, ", " & Me.ac_firma3, "")
SqlKrt1 = Mid(SqlKrt1, 2)
SqlKrt1 = IIf(Len(SqlKrt1) > 0, " WHERE ((tbl_firmalar.[firma-id]) Not In (" & SqlKrt1 & "))", "")
SqlSec = " SELECT tbl_firmalar.[firma-id], tbl_firmalar.firma_adi, tbl_firmalar.firma_adresi FROM tbl_firmalar" & SqlKrt1
Me.ac_firma3.RowSource = SqlSec
End Sub