Problem transferring filter from form to reoprt

  • Thread starter Thread starter josh
  • Start date Start date
J

josh

I have various combo boxes on my a form where the
selections are text but are stored through a primary
key. For example one of the combo boxes is states. When
you select a state you select from a list of states (New
York, New Jersey, etc.) but the id number is stored in
the actual field.

I have a command button that uses the filter from the
form to filter a report. It works for everything, except
when I am filtering using a combo box.

When I try to transfer the filter to the report, it
doesn't allow me to because the filter looks something
like this

((Lookup_State.State="NY"))

The report has the same exact combo boxes as the form to
allow any filter that I could use for the form to
transfer successfully to the report. Any ideas?

Thanks in advance.
Josh
 
josh said:
I have various combo boxes on my a form where the
selections are text but are stored through a primary
key. For example one of the combo boxes is states. When
you select a state you select from a list of states (New
York, New Jersey, etc.) but the id number is stored in
the actual field.

I have a command button that uses the filter from the
form to filter a report. It works for everything, except
when I am filtering using a combo box.

When I try to transfer the filter to the report, it
doesn't allow me to because the filter looks something
like this

((Lookup_State.State="NY"))

The report has the same exact combo boxes as the form to
allow any filter that I could use for the form to
transfer successfully to the report. Any ideas?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Possibly one of these:

1. Your State ComboBoxes on the form & the report are NOT exactly the
same. One way to make sure they are exactly alike is to copy the
form's ComboBox to the report. First open both form & report in
design view. Then delete the report's ComboBox. Then copy the
ComboBox off the form and paste it on the Report.

2. The report's RecordSource returns a different data type for the
State than the State ComboBox uses as it's BoundColumn. E.g.: The
RecordSource returns "NY" for New York. The State ComboBox returns
the StateID 2 for New York. Because 2 <> "NY" the ComboBox will not
"know" what to display. Run the report's RecordSource query and the
ComboBox's RowSource query to see if the values in both the
resultsets' State columns are the same data types.

- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQFJr0oechKqOuFEgEQJsqgCePSa8Jc0U6Z+hGOWjUqaIJTjMfgEAoKIK
Jty9R3IfjGPNPANNxC6rDD9d
=tjOP
-----END PGP SIGNATURE-----
 
Back
Top