Showing Query Results on a Form

Joined
Mar 23, 2004
Messages
241
:rolleyes:

Hello chaps and chicks.

I'm a bit of a relative newbie to Access still, so please speak to me like a baby if you have any answers.

My problem is this:

Scenario - I have a number of tables for client data errors created on 4 different systems by a number of different departments. Upon opening the database, users are greeted by a form to select their department.

Having selected their department, the MAIN MENU opens up with 4 buttons which open up each system's set of data errors they've created. A form filters only the errors created by the department the user has selected at this point.


What I want to do - I want, on MAIN MENU form, to show how many errors that department has on that system next to the relevant button, so users can see which ones apply to their department. I have set up a query to count this, and if I create a form wizard form off that, it works fine. The minute I try and copy it onto the MAIN MENU form, I get the "#Name?" error show in the box.

Any help would be hysterically appreciated, because the silly microsoft paper cat is being no help, and I'm about to combust.

Caring Sharing Bristol Billy Bob

PS. I should point out Visual Basic is still a complete mystery to me!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
OK, let's say you have MyQuery with SomeResult. You want SomeResult to show on the Menu form -- and SomeResult is the only item in the query (a typical, single-item Totals query).

Try this...

In the Menu, place an unbound Textbox. The ControlSource should be
=[MyQuery]![SomeResult]

If instead the resuslt is on a form, that will be...
=[Forms]![MyForm]![SomeResult]

If it's in a report it becomes...
=[Reports]![MyReport]![SomeResult]

HTH
Denis
 
Upvote 0
:biggrin:

Thanks for your help! That worked, in conjunction with running the query forms in the background. I think my assumption that the ControlSource would automatically run the query was the problem.

Never assume anything, it makes an *** out of u and me, right?

Live and learn, eh? Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,221,672
Messages
6,161,199
Members
451,688
Latest member
Gregs44132

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