Problem accessing Form data with Report

mattalin

Board Regular
Joined
Mar 18, 2003
Messages
89
I am currently creating a report to access data for a specific project for a given period. In order to show data for a specific project and period I created a form to enter report criteria, which opens whenever I open my report. However, I keep getting the following error message: "The Expression you entered has a function name that Microsoft Access can't find" and can't figure out how to correct it.
 

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
Does this criteria form work via creating an SQL statement in VBA? If so, try the following:

Modify your VBA code so that it temporarily sends the built SQL statement to a MsgBox, just so you can see what it is building.

Then build your selection manually through a query, switch to SQL view, and compare this SQL statement with the one that you are trying to build via VBA.
 
Upvote 0
I did not create an SQL statement in VBA. I created a form with three inputs that the report would use to show data for a given period (Dec-03 for example) since my database contains data for more than one period. I then created macros to obtain data from the form and apply it when my report is opened:

macro 1: Open Dialog - Action: OpenForm
macro 2: Close Dialog - Action: Close
macro 3: OK (button) - Action: SetValue
macro 4: Cancel - Action: Close
 
Upvote 0
I am not familiar with this method. How are the inputted values transferred from your Form to a Query to select those records?

I believe the methodology should be something like:

1. Select criteria from Form
2. Use criteria from step 1 to update a Query to select proper records
3. Open Report based on the Query in step 2
 
Upvote 0

Forum statistics

Threads
1,221,614
Messages
6,160,839
Members
451,673
Latest member
wella86

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