|
-
March 27th, 2001, 01:43 PM
#1
recordset
I would like to access a recordset in a previous form. Is there a way to pass the variable over to the next form or do i need to make it a global variable?
thnxs
-
March 27th, 2001, 01:51 PM
#2
Re: recordset
If you declare the recorset as public in a module, it will be assessable in all forms.
David Paulson
-
March 27th, 2001, 01:55 PM
#3
Re: recordset
Is there any other way? because I would like to avoid using global variable.
Thanks,
-
March 27th, 2001, 02:05 PM
#4
Re: recordset
You can make a public property on the second form
and set the recordset to that.
Private m_ThisRecordSet as RecordSet
Public Property Set TheRecordSet(rsIn as RecordSet)
set m_ThisRecordSet = rsIn
End Property
And then when you create the form
Dim frm as FormName
set frm = new FormName
Set frm.TheRecordSet = Rs
where Rs is the instance of the recordset
you currently have.
No global variables.
hope this answers your question.
-
March 27th, 2001, 04:14 PM
#5
Re: recordset
Never tried but I don't know why you couldn't use Form1.rs to reference the recordset on another form. Seems rather crude though.
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
|