Solved

Access Query Subform Value

Posted on 2010-08-27
2
435 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access creating a Chart from Search result on Form view 2 21
data analyst 3 49
Open CSV, modify and save as xls from Access 12 19
Access Excel export not behaving 2 25
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

920 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

12 Experts available now in Live!

Get 1:1 Help Now