title image


Smiley Klassenmodul für Collections
Meinst du so etwas?



Option Compare Database

Option Explicit

Dim Coll As New Collection, lKey As Long, Key As String

Public Sub Add(S)

lKey = lKey + 1

Key = "X" & Format(lKey, "000000")

Coll.Add S, Key

End Sub



Public Sub Remove(S)

Dim I As Long

For I = 1 To Coll.Count

If Coll.Item(I) = S Then

Coll.Remove I

Exit For

End If

Next

End Sub



Public Sub Clear()

Dim I As Long

For I = 1 To Coll.Count

Coll.Remove 1

Next

lKey = 0

End Sub



Property Get Exists(S) As Boolean

Dim I As Long

Exists = False

For I = 1 To Coll.Count

If Coll.Item(I) = S Then

Exists = True

Exit For

End If

Next

End Property





Gruß aus dem Norden
Reinhard


Bitte immer die Access-Version angeben!
DB-Wiki


Wie man Fragen richtig stellt

YaccessAccess-FAQUnd ansonsten: Wikipedia




geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: