OpenReport Macro Problem

J

JAJansenJr

I have successfully used the OpenReport macro for two reports. The WHERE
clause selects the records which contain the field value that I am selecting
records for. For a third report, however, I am unable to show the records
containing the field value - I see no records at all. I have examined and
rexamined the where clause and see nothing wrong. Can anyone suggest why I
am unable to show the records I am trying to select for in my report? Thanks!
 
F

fredg

I have successfully used the OpenReport macro for two reports. The WHERE
clause selects the records which contain the field value that I am selecting
records for. For a third report, however, I am unable to show the records
containing the field value - I see no records at all. I have examined and
rexamined the where clause and see nothing wrong. Can anyone suggest why I
am unable to show the records I am trying to select for in my report? Thanks!

You're problem lies in the fact that you are there and we are not.
Crystal ball's take a long weekend off.
If you care to post the actual OpenReport criteria and tell us the
field datatypes involved, perhaps someone can help.
 
J

JAJansenJr

Sorry! I thought from the information provided it might ring a bell with
someone.

Here's the Row Source:

SELECT DISTINCT [Warehouse].[Location] FROM Warehouse ORDER BY
[Warehouse].[Location];

Herer's the WHERE clause for OpenReport (macro is located in the after
update event):

[Location]=[Forms]![ReportonLocation]![ComboLoc]

The combobox shows the Location information but the report does not show any
records.

Now, for a different field, Manufacturer, everything works fine with the
following:

For the row source:

SELECT [ECAVendors].[ID], [ECAVendors].[Vendor ID], [ECAVendors].[Vendor
Name] FROM ECAVendors ORDER BY [Vendor ID];

The WHERE clause for OpenReport (macro is triggered by the After Update
event) is

[Warehouse]![Mfgr ID]=[Forms]![ReportonManufacturer]![Combo5]

This works fine and the report shows all records for a given manufacturer.

Any suggestions will be gratefully received.
 
J

JAJansenJr

I found the solution to my problem. Everything works fine if I set the bound
column to 1. Apparently I had it set to some other value.



JAJansenJr said:
Sorry! I thought from the information provided it might ring a bell with
someone.

Here's the Row Source:

SELECT DISTINCT [Warehouse].[Location] FROM Warehouse ORDER BY
[Warehouse].[Location];

Herer's the WHERE clause for OpenReport (macro is located in the after
update event):

[Location]=[Forms]![ReportonLocation]![ComboLoc]

The combobox shows the Location information but the report does not show any
records.

Now, for a different field, Manufacturer, everything works fine with the
following:

For the row source:

SELECT [ECAVendors].[ID], [ECAVendors].[Vendor ID], [ECAVendors].[Vendor
Name] FROM ECAVendors ORDER BY [Vendor ID];

The WHERE clause for OpenReport (macro is triggered by the After Update
event) is

[Warehouse]![Mfgr ID]=[Forms]![ReportonManufacturer]![Combo5]

This works fine and the report shows all records for a given manufacturer.

Any suggestions will be gratefully received.



fredg said:
You're problem lies in the fact that you are there and we are not.
Crystal ball's take a long weekend off.
If you care to post the actual OpenReport criteria and tell us the
field datatypes involved, perhaps someone can help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top