Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access Query Subform Value

Posted on 2010-08-27
2
Medium Priority
?
447 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
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
INHOUSERES earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

926 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