Display query results on a form

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,364
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi all,

I need some help with displaying the results of a query in a text box on a form.

I created a query which simply creates a count of yes and no which is stored in a table.

There are a total of 81 records in the table so the query produces CountOfYes = 10 and CountOfNo = 71 and CountOfYesNo = 81

I used an expression in the one field to query by a specific category and then three expressions.

1) CountOfYes: Sum([Force_Renewal])*-1
2) CountOfNo: Count([Force_Renewal])+Sum([Force_Renewal])
3) CountOfYesNo : [CountOfYes]+[CountOfNo]

Now on the form I would like to create a text box which would say 10 of 81. It can be more than one text box if necessary.

Am I going about this the right way?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
build a query with results,
use the form builder wizard to build a form off this query. frmResults
save
on a 'search form' enter the data , click FIND btn , which opens the form ,frmResults
 
Upvote 0
Thank you for your help on this. I was trying to avoid using a form to display the results so I fixed it with DCount.
 
Upvote 0

Forum statistics

Threads
1,221,832
Messages
6,162,255
Members
451,757
Latest member
iours

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top