Recordset for queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello...

I am working with Access 2000 and have a form that opens a number of
recordsets to test for specific conditions. Is there a way to open a query
using this recordset?

Currently the only option I have is designing a number of queries that use
the tables and parameters from the form.

Appreciate assistance on this

Fred Alyea
 
I am working with Access 2000 and have a form that opens a number of
recordsets to test for specific conditions. Is there a way to open a query
using this recordset?

What exactly should this mean? Or better, what are you trying to have
your program decide?
 
Morning...

The recordset's that are opened are based on criteria from the form they are
attached to. There are about 30 recordset's but only two are opened based on
the selected criteria. I want to open a query based on these 2 recordset's
that will supply information to a subForm where data can be modified as
needed. I can build the 30+ additional queries need to duplicate the
recordsets but I'm thinking there has to be a simpler way to use an open
recordset to create a query.

Appreciate your assistance.
 
Great! What kinds of recordset are those? Could you say that you have
different views on the same table, but with parameters?
 
The recordset's that are created are on two different tables. The parameters
for each query are the same. Employee ID, Date. I want to open a query with
each of the recordset's. I could design a query for each but since there are
like 30+ tables I want a simpler solution. I know the db.openrecordset uses
a SQL statement but I dont know how to capture that and open a query using
it. The SQL, i.e. db.openrecordset is within a Form as part of an
EventProcedure.

Appreciate your time and assistance
 
Is it that you want to open a query? For a form, you can both set the
..Recordsource property (to point to different tables) and the
..Filter/.FilterOn properties (to provide, well, filtering)

Tylendal wrote:
 
Hi...

Well what I want to do is open a form as a subForm using the recordset that
the main form creates.

The main form creates two recordset's Arst and Brst. Can I open a subForm
and have the recordsource point to the recordset created by the main form?
Not sure what the process would be for that, i.e. correct syntax

Again thanks for your help.
 
You can't open a subform. You *can* reassign its RecordSource property
on the fly, like

me!subformcontrolname.form.recordsource = yoursomething
 
Wow.... I like that idea. I will try that out tomorrow when Im at the
office. Its 7 PM here in Florida. i will let you know how it works and I
really appreciate you time and help on this. It's really appreciated.
 
Yes it does work and I have used it quite frequently. You can even go so
far as to change the source object and display a different subform
(provided you change the master/child link fields if needed)
 
Oh, as you mention that:
I used to use a tabcontrol with several tabs with subforms. On a larger
database this became forbiddingly slow. So I pointed all subform
controls to some dummy form (loads fast) and assign the SourceObject in
the Change event of the tabcontrol (reading the required value from the
Tag property that I set for that purpose). Drawback is that you don't
have immediate subform communication ability then
 
I believe that it is possible to have UNBOUND subform controls -
subforms not bound to specific objects.
 
Creating a vairable with the SQL statement works just fine. The form OnOpen
uses the variable to set the RecordSource. Thanks guys, appreciate you help
and input.
 
Back
Top