getting a value from a query - that is not the control source. (1 Viewer)

Dranoweb

Registered User.
Local time
Today, 10:32
Joined
Sep 28, 2009
Messages
68
Hi,

I'm trying to get a conglomorate report together that combines data from a number of queries, tables and crosstabs.

currently all works except my attempt to programatically reference a field in a query.

Said query has only one line as it is a summary query.

my current code is this:

The first line counts the number of records in a different report.
the second line is my issue - I'm trying to get the value of the first record in column "SumofAttend" in the query "CFGTOTALSFORTNIGHT"

Code:
Private Sub Command91_Click()
CFGMEETINGS.Value = DCount("ID", "fortnightpresenter")
CFGATTENDEES.Value = cfgtotalsfortnight!SumofATTEND.Value

Any ideas/suggestions?
 

Dranoweb

Registered User.
Local time
Today, 10:32
Joined
Sep 28, 2009
Messages
68
Thanks - have resorted to a subreport. it works, and will investigate dlookup shortly.
 

Users who are viewing this thread

Top Bottom