|
-
Jul 18th, 2000, 04:20 AM
#1
Thread Starter
Member
Hello All,
I just have a small question that might seem trivial but nevertheless important to my current project. The first stage of my program involves loading up MDB files and displaying them on a grid (MSflex, DBgrid whatever...), right now I have a grid interconnected to a hidden data control. It works all fine, except my boss has asked that the function be portable, that means the subroutine that puts the information on the grid must have a parameter passing in the name of the data control! (cause the form might be different in another program)
right now I have:
private sub showgrid(datacontroller as data)
'some code here
end sub
The code above is giving me a type mismatch. I am wondering is it even possible to pass in the data controller as a variable? Is there any other solution? Thanks in advance for any help!
Francis.
-
Jul 18th, 2000, 10:45 AM
#2
Hyperactive Member
you could try passing it as a control object, eg
Dim MyObj as Control
Set Myobj = DataControl1
Call MyFunction(myObj)
you can then manipulate MyObj in the calling function
-
Jul 18th, 2000, 12:01 PM
#3
Thread Starter
Member
Thanks! I think that should solve my problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|