Solved

Access Query Subform Value

Posted on 2010-08-27
2
438 Views
Last Modified: 2013-11-28
Hi,

I have a subform which is a query which will only return one record and I would like to know how to reference the values in this query subform?

Thanks
Mark
0
Comment
Question by:mcs26
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
INHOUSERES earned 500 total points
ID: 33541688
Dim db as Database
Set db = CurrentDB
Dim rstQ as Recordset

Set rstQ = db.openrecordset("qryQueryName",dbopensnapshot,dbseechanges)

'rstq(0) = first field
0
 
LVL 5

Expert Comment

by:INHOUSERES
ID: 33541695
There's probably an easier method to grab the queryname from the subform, but both will get you the same results.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question