Solved

Access Query Subform Value

Posted on 2010-08-27
2
433 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 500 total points
Comment Utility
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
Comment Utility
There's probably an easier method to grab the queryname from the subform, but both will get you the same results.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now