hi all
i have this short source code:
---
Dim varElem As Variant
Dim strSQL As String
Dim i As Integer
Dim frm As Form
Set dbs = CurrentDb
On Error GoTo Do_Nothing
DoCmd.Close acQuery, "Auswahl", acSaveNo
dbs.QueryDefs.Delete "Auswahl"
Do_Nothing:
i = 0
If Liste_Auswahl.ItemsSelected.Count = 0 Then
Else
strSQL = "SELECT"
For Each varElem In Liste_Auswahl.ItemsSelected
i = i + 1
strSQL = strSQL & " ["
strSQL = strSQL & Liste_Auswahl.ItemData(varElem) & "]"
If i < Liste_Auswahl.ItemsSelected.Count Then
strSQL = strSQL & ","
End If
Next varElem
strSQL = strSQL & " FROM FLR;"
Set qdf = dbs.CreateQueryDef("Auswahl", strSQL)
DoCmd.OpenQuery "Auswahl", acViewNormal, acReadOnly
Me.Visible = False
---
It is written using version 2000 of ms access. so i wanted to give the
whole database including this code to somebody who uses version 2002 of
ms access. in version 2002 the code doesn't function cause of a
compiling error. i think that probably one of the key words (commands)
used in the code was not found by the version 2002...
Does somebody have an idee what i should write in another way.
Thnx
Peter