Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / August 2006

Tip: Looking for answers? Try searching our database.

query parameters using sub forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
segurarl - 14 Aug 2006 16:11 GMT
I'm using the following parameter in a query to get records from a table
using a sub-form:

[forms]![ProductTable]![subdetail].[Form]![ID]

If the sub-form has more than one record, the query takes only the FIRST
record and ignores the rest.

How can I include all records in the sub-form?

Thank you!
Rick Brandt - 14 Aug 2006 16:22 GMT
> I'm using the following parameter in a query to get records from a
> table using a sub-form:
[quoted text clipped - 7 lines]
>
> Thank you!

With a parameter you can't.  By the way it will use the currently selected
record in the subform, not necessarily the "first" one.  This is the same
behavior you would get if the parameter were referencing a control on the
main form right?  You would get a match on that control for the current
record, not for every record in the form's RecordSource.

Sounds like you need to add the table that the subform uses to your query
and then filter on the related field in the main table by referencing a
control on the main form.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.