Docmd.OpenForm

C

Capn Ron

I have posted this problem before and always end up with a
quote from the Help file. Either I don't understand the
quote from the Help file, (since I have the help file
too), or no one has actually tried this.

I have TableA with 4 fields: TableID, 1stData, 2ndData,
3rdData. It has 500 records.

I have TableB with 1 field: TableID. It has 5 records
which match 5 of the TableIDs in TableA

I have QueryA which selects all the fields from TableA
including the Primary Index "TableID".

I have QueryB which uses TableA and TableB and selects
only the records from TableA that have and equal TableID
in TableB.

The output of QueryA is indentical to the output of QueryB
except Query produces 500 records and QueryB produces 5.

I have FormA which has a RecordSouce "QueryA".

I have FormB which opens FormA twice using the following
code:

DoCmd.OpenForm "FormA", , , , , acDialog
DoCmd.OpenForm "FormA", , "QueryB", , , acDialog

Both produce 500 records. What am I doing wrong.

TIA
Capn
 
B

Bruce M. Thompson

The output of QueryA is indentical to the output of QueryB
except Query produces 500 records and QueryB produces 5.

I have FormA which has a RecordSouce "QueryA".

I have FormB which opens FormA twice using the following
code:

DoCmd.OpenForm "FormA", , , , , acDialog
DoCmd.OpenForm "FormA", , "QueryB", , , acDialog

Both produce 500 records. What am I doing wrong.

I suppose that it's because QueryB contains no *criteria* through which it would
act as a "filter".
 
G

Guest

-----Original Message-----

I suppose that it's because QueryB contains no
*criteria* through which it would
act as a "filter".

--
Bruce M. Thompson
(e-mail address removed) (See the Access FAQ at http://www.mvps.org/access)
within the newsgroups so that all might benefit.<<


.
Bruce,
In the following decription of "Filter Name" from the
Help file I see no mention of *criteria*:

Filter Name A filter that restricts or sorts the form's
records. You can enter the name of either an existing
query or a filter that was saved as a query. However, the
query must include all the fields in the form you are
opening or have its OutputAllFields property set to Yes.

Can you show me by example what you mean?

Capn Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top