I have a list and it's rowsourcetype is set to the function
get_databases_DIR. Function works without any problem in MDB, but not
in MDE (nothing is returned). If Static was the problem, since I am
returning the array from second function, it shouldn't work in MDB
also, isn't ?
Private Function get_databases_DIR(vn_list As Control, vn_unique_ID,
vn_row As Long, vn_col As Long, vn_action_code As Integer) As Variant
On Error GoTo error_handler:
Static arr_dbs() As String
Dim var_return_value As Variant
var_return_value = Null
Select Case vn_action_code
Case 0 'initialize
var_dbs_cnt = get_databases(arr_dbs())
var_return_value = True
Case 1 'open
var_return_value = Timer 'unique ID number for control
Case 2 'not used by access
var_return_value = ""
Case 3 'get number of rows
var_return_value = var_dbs_cnt
Case 4 'get number of columns
var_return_value = 2
Case 5 'use column widths specified in properties
var_return_value = -1
Case 6 'get data
var_return_value = arr_dbs(vn_row + 1, vn_col + 1)
Case 9
Erase arr_dbs
End Select
get_databases_DIR = var_return_value
End Function
Public Function get_databases(ByRef arr_dbs() As String) As Integer
..... fill arr_dbs with data.....
End Function