RowSourcetype Function works in MDB but not in MDE



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
.



Relevant Pages

  • Re: Cant update a Report fiels
    ... The logic works in the *.mde version, but not in the *.mdb version. ... I'm able to return the filter string back to the ... >> announce to the report readers that the report is filtered. ...
    (microsoft.public.access.formscoding)
  • Re: Opening Excel from Access
    ... Tried changing it to an MDB but no luck. ... Dim MDBName As String, DefaultDirectory As String, SQLStg As String ... If MsgBox("Do you want to use this database in future?", ... comes when I click the button on Access form to show the Excel file. ...
    (comp.databases.ms-access)
  • Re: Access crashes when calling DLL function.
    ... I have started bypassing code in the form to find the problem. ... are local String variables. ... I then built a simple input form (in the same mdb) that calls the crashing ... functions from a DLL they provide. ...
    (microsoft.public.access.modulesdaovba)
  • Re: How do I open an Access Database using VB6.0
    ... Use something like a ShellExecute() API to start up the Access ... ByVal lpFile As String, ByVal lpParameters As String, _ ... close the MDB when your application is closed from the System Tray. ... it opens it then closes it when ...
    (microsoft.public.vb.database.dao)
  • Re: Filtering on a VB function return value
    ... I tried returning a string, but I have the same problem. ... Dim typeName As String ... In a query I pass certain values from a table to the VBA function. ... in Access 2000/2002 mdb, ...
    (microsoft.public.access.queries)