Data from form's combo box doesn't show in report

A

amjjam

Hi,

I have a Companies and Contacts db. Since multiple people may be contacts
working at the same company, the contacts form is a subform of the company
form. I have created a combo box for the license or credentials a contact
holds. Data examples are MD, Ph D, LCSW, RN, etc. I have set the default
value in the combo box to "other" by using the expression
=[LicOrCredsCombo12].[ItemData](18). It fills in form and table data
correctly.

A report called "Contact Fact Sheet" can be accessed 2 ways. From the
Company Form, I can hit a control button labeled "View Reports" and choose
"Contact Fact Sheet." From the Contacts Form, I can hit a control button
labeled "View Contact Fact Sheet." Either button asks for a parameter value
based on the contact's id number so that only one fact sheet will preview at
a time.

When I base the report's text box control source on a query which includes
the LicenseOrCredentialsID from the License or Credentials Table, the report
returns the row number associated with the appropriate license or credentials
in the table. For example, in the table row 1's data is Ph D; row 2's data is
MSW, etc. So the report is returning data from the wrong column. How do I
correct that to show column 2's data? I have tried getting the report to read
directly from the form by basing the control source on the expression
=Forms!Contacts!LicenseOrCredentialsID, but that returns #Name? in the
report. Thanks for any 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