[RESOLVED] Passing A Flexgrid To A Function
I'm having problems doing this:
I have a MSFlexgrid sitting on a tabbed form named "grdTrans" and a disconnected recordset "rs".
When I pass this grid to a module function "PopulateGrid(ByRef oFlxGrid as MSFlexGrid, ByRef rs as ADODB.Recordset) " it doesn't work.
Seems like the grdTrans object is only viewed as a zero length string or something rather than an object. The recordset seems to be ok.
I tried "Call PopulateGrid (grdTrans, rs)" as well as "Call PopulateGrid(Me.grdTrans, rs) both with no luck.
Can you pass objects to functions in VBA?:sick:
*************** Error *********
Sorry that should have read
VB Code:
Dim g as MSFlexGrid
Set g = grdTrans.Object
call PopulateGrid(g,rs)