473,383 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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

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
2 3934
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jurrie | last post by:
hi all, In my XML document i have <paragraph type="...">some text</paragraph> the type="..." specifies what type the paragraph is. This is all defined somewehere else in the document. The type...
1
by: Andrés Giraldo | last post by:
Hi! I'm trying to pass trough all the objects of a form but I have some text inputs in a DIV and I have many DIVs like this on my form. I'm doing something like: for (i = 0; i <...
0
by: Javier de la Torre | last post by:
Hi all, I'm wondering if someone has experiment problems using SQL statements with UNIONS trough the ODBC driver. For example this SQL statement: (SELECT DISTINCT compactes.numplec AS UnitId...
3
by: Antoine Junod | last post by:
Hello, I definitely have a problem to build a clean data structure. I would be very happy if some of you could help me as well as in the past. Here is my problem: -> I have a list of...
5
by: equip200 | last post by:
i would like some assistance on how to pass data or string from one vb program to another c# program. can this be done with vbscript code to send data to the c# program? Thanks
2
by: M Shafaat | last post by:
Hi! Consider the following: Object A is a member of Object B. Object A has a known identifier. Object B has an unknown identifier. How do we reference Object B using Object A? I have tried...
3
by: Sandra Castellanos | last post by:
I want to know if there is a way to easily iterate trough all the controls contained, say, in a table, including the controls that can be inside the cells and in any nested tables that are inside?...
1
by: Roger Oshaug | last post by:
Access 2003 I have a simple line graph with one line and I need an extra horizontal line in that graph. I want something similar to this, (without the vertical line): ...
4
by: Nedim | last post by:
first let me say sorry if this is in the wrong place, i'm pretty new to programming and to be honest i am a bit intimidated by these forums. now that i've got that out of the way, i was bored and...
5
by: Tor Inge Rislaa | last post by:
I have a dataset with a table "Artikler". Before I bind the table to a DataList in my Web Form I want to update the value of each row of the field "PreText" in the table. (I don't want to update...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.