Article ID: 117615
Article Last Modified on 11/6/2000
Option Compare Database 'Use database order for string _
comparisons.
Dim iTotTables As Integer
Dim My_CurrDB As Database
Dim TableList2() As String
Dim iTotFlds As Integer
Dim FieldList() As wlib_FldInfo
Function FillTables (fld As Control, handle As Long, lRow As _
Long, lCol As Long, iMsg As Integer) As Variant
Static returnval As Variant
' If you change the above line to the following the error
' will not occur:
' Dim returnval As Variant
Select Case iMsg
Case LB_INITIALIZE
returnval = -1&
Case LB_OPEN
returnval = Timer
Case LB_GETROWCOUNT
returnval = iTotTables
Case LB_GETCOLUMNCOUNT
returnval = 1
Case LB_GETCOLUMNWIDTH
returnval = -1&
Case LB_GETVALUE
returnval = TableList2(lRow + 1)
Case LB_GETFORMAT
Case LB_CLOSE
Case LB_END
End Select
FillTables = returnval
End Function
Command button:
Name: Button0
Caption: Requery Table List
List box:
Name: Field1
RowSourceType: FillTables
Sub Button0_Click ()
Set My_CurrDB = DBEngine.Workspaces(0).Databases(0)
iTotTables = wlib_GetObjList(My_CurrDB, A_TABLE, TableList2(),_
False, &HFFFFFFFF)
Me!Field1.Requery
End Sub
Additional query words: programming gpf
Keywords: kberrmsg kbbug kbprogramming KB117615