query results not showing up in report

  • Thread starter Thread starter megbowlstrike
  • Start date Start date
M

megbowlstrike

Hi. I have a query that displays an employee's id, name, and current
country. The output of this query is to a report. The user accesses
the report by clicking a combo box on a form and choosing a country to
view. I have macros set up for an OK button and cancel button on the
form, and the on click for the OK button is what brings up the
report.

When I run the query by itself, it works fine and the output is
displayed in the query's datasheet view. But when I try to go through
the form's combo box and view the query results in the report, the
data doesn't show up at all in the report--just the column headings.
Do you know what might be wrong? I looked at the report's properties
and the report is based off the query. I can't seem to find anything
else wrong but it is probably something very obvious and simple. TIA
 
Is the form being closed? Does the report have a filter property value?

What is the SQL view of the report's record source?
 
Is the form being closed? Does the report have a filter property value?

What is the SQL view of the report's record source?

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCPhttp://www.access.hookom.net/UCP/Default.htm






- Show quoted text -

Here is the SQL view of the query. The query works and returns the
correct data if you just run the query by itself. But when you try to
do the dropdown on the report, the results do not show up on the
report--it's just a blank report with the appropriate headings.

SELECT [tbl_Umbrella_EE Data_Constant].CurrentCountry,
[tbl_Umbrella_EE Data_Constant].EmployeeID, [tbl_Umbrella_EE
Data_Constant].LastName, [tbl_Umbrella_EE Data_Constant].FirstName
FROM [tbl_Umbrella_EE Data_Constant] INNER JOIN [tbl_Umbrella_EE
Data_Changing] ON [tbl_Umbrella_EE Data_Constant].EmployeeID =
[tbl_Umbrella_EE Data_Changing].EmployeeID
WHERE ((([tbl_Umbrella_EE Data_Constant].CurrentCountry)=[Forms]!
[frmCountryReport]![cmbCurrentCountry]));

I have a macro set for an OK button that will open the form
(frmCountryReport). The report does not have a filter property value--
should it?
 
Your symptoms suggest you might be closing frmCountryReport in code or macro
somewhere after your report begins to open.

Is your form opened using code or a macro in your report?

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Is the form being closed? Does the report have a filter property value?

What is the SQL view of the report's record source?

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCPhttp://www.access.hookom.net/UCP/Default.htm






- Show quoted text -

Here is the SQL view of the query. The query works and returns the
correct data if you just run the query by itself. But when you try to
do the dropdown on the report, the results do not show up on the
report--it's just a blank report with the appropriate headings.

SELECT [tbl_Umbrella_EE Data_Constant].CurrentCountry,
[tbl_Umbrella_EE Data_Constant].EmployeeID, [tbl_Umbrella_EE
Data_Constant].LastName, [tbl_Umbrella_EE Data_Constant].FirstName
FROM [tbl_Umbrella_EE Data_Constant] INNER JOIN [tbl_Umbrella_EE
Data_Changing] ON [tbl_Umbrella_EE Data_Constant].EmployeeID =
[tbl_Umbrella_EE Data_Changing].EmployeeID
WHERE ((([tbl_Umbrella_EE Data_Constant].CurrentCountry)=[Forms]!
[frmCountryReport]![cmbCurrentCountry]));

I have a macro set for an OK button that will open the form
(frmCountryReport). The report does not have a filter property value--
should it?
 
Your symptoms suggest you might be closing frmCountryReport in code or macro
somewhere after your report begins to open.

Is your form opened using code or a macro in your report?

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCPhttp://www.access.hookom.net/UCP/Default.htm



Here is the SQL view of the query. The query works and returns the
correct data if you just run the query by itself. But when you try to
do the dropdown on the report, the results do not show up on the
report--it's just a blank report with the appropriate headings.
SELECT [tbl_Umbrella_EE Data_Constant].CurrentCountry,
[tbl_Umbrella_EE Data_Constant].EmployeeID, [tbl_Umbrella_EE
Data_Constant].LastName, [tbl_Umbrella_EE Data_Constant].FirstName
FROM [tbl_Umbrella_EE Data_Constant] INNER JOIN [tbl_Umbrella_EE
Data_Changing] ON [tbl_Umbrella_EE Data_Constant].EmployeeID =
[tbl_Umbrella_EE Data_Changing].EmployeeID
WHERE ((([tbl_Umbrella_EE Data_Constant].CurrentCountry)=[Forms]!
[frmCountryReport]![cmbCurrentCountry]));
I have a macro set for an OK button that will open the form
(frmCountryReport). The report does not have a filter property value--
should it?- Hide quoted text -

- Show quoted text -

The form is opened using a macro in the report. I have a macro called
Open and the action is to open the form. I have another macro called
Close and the action is to close the form. I have another macro
called OK and it's action is to set value. This macro is for the OK
button that the user clicks after selecting a country in the combo
box. In the report's properties, the OnOpen is set to the Open macro
and the OnClose is set to the Close macro. I think these are the only
two events in the report.

Thanks for your fast responses!
 
Back
Top