By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

How to pass trough form-variable, querydef-variable...

P: n/a
Hello,
this should be an easy one, but I've had always troubles with it.
How to pass trough a querydef-variable, form-variable and so on from a
function to the caller-routine? Is there a simply rule one should
follow?

eg.
function test(a as integer) as querydef
dim qdfOut as querydef
dim qdf as querydef
...
qdfOut = qdf
...
test = qdfout
end function
sub test2()

debug.print test(5).name

end sub

When do I need to use the word 'set', or the word object
eg.
set qdfOut = qdf??
set qdfOut = qdf.object
....
Oh my god, it's a mystery to me,
thanks,
--
bebelino

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You would use the "Set" in the calling procedure. To use your
example, the calling procedure would look like this:

sub test2()
dim qdf as querydef

set qdf=test(5)
debug.print qdf.name

end sub

Hope this helps.

Jeff
bebelino <a.*@c.d> wrote in message news:<9o********************************@4ax.com>. ..
Hello,
this should be an easy one, but I've had always troubles with it.
How to pass trough a querydef-variable, form-variable and so on from a
function to the caller-routine? Is there a simply rule one should
follow?

eg.
function test(a as integer) as querydef
dim qdfOut as querydef
dim qdf as querydef
...
qdfOut = qdf
...
test = qdfout
end function
sub test2()

debug.print test(5).name

end sub

When do I need to use the word 'set', or the word object
eg.
set qdfOut = qdf??
set qdfOut = qdf.object
...
Oh my god, it's a mystery to me,
thanks,

Nov 12 '05 #2

P: n/a
On 23 Oct 2003 09:47:51 -0700, co******@hotmail.com (jeff colton)
wrote:
You would use the "Set" in the calling procedure. To use your
example, the calling procedure would look like this:

sub test2()
dim qdf as querydef

set qdf=test(5)
debug.print qdf.name

end sub


Thanks for your reply Jack, I haven't had much time these days. I'll
try it out,
--
bebelino
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.