mond007
mond007

Reputation: 109

Displaying Total on MS Access Form

I need to develop quite a serious database in access and start building up the Main Menu. So far I have (I have broken the problem down to a sample DB): a) Set up a Table of Data (Table1) (Column 1 = Name, Column 2 = No of Staff (Numeric)) So my Data looks like this

Name      No of Staff
TestName1   1
TestName2   2

b) Created a Query (Table1 Query) to provide a Total of 3 as a sum total - this works as I get a total of 3.

c) I created a Form that I want as my Summary Form. and inserted a TextBox and placed the following formulae within the Expression Builder :

So I have the following : enter image description here

But the Form field yields a #Name?

Sorry for the novice question but I have read up quite a lot about this and this should work fine. I am confused why this simple little task is daunting.

Any help would be great. thxs in advance

Upvotes: 0

Views: 4173

Answers (1)

Sergey S.
Sergey S.

Reputation: 6336

Two variants:

  1. Set the query as datasource for your form and select the column with sum [Sum Of No of staff] as control source for your text field

  2. set as Control Source for text field as

    = Dlookup("[Sum Of No of staff]", "[Table1 Query]")

Upvotes: 2

Related Questions