RowSource as varialbe???

helloworld

Registered User.
Local time
Today, 14:44
Joined
May 18, 2004
Messages
62
Hi there,

I have a form with two comboxes. The first combo-box refines the selection in the second combobox. Now I also have a button that generates a report based on the second combo-box. However, that report only comes up with one of the items in the second box. What I need is for it to come up with all the records in the second box. How would I do that? I was thinking about somehow converting the rowsource in the second box as a variable but I do not have the necessary skills to do so. Any help would be greatly appreciated.

Thanks.
 
hello hello,

The RecordSource for your report must be the SAME as the RowSource
for your 2nd combo. Not just the selected item.

It seems that your second combo-box has a dynamic rowsource. That is
you define it, assign it to the combo, and then requery the combo. At this time, you can make a dynamic querydef (QDF), add the field(s) that your
report needs, and use that as the RecordSource for your report.

Use the search Facility here for QDF or "Dynamic and Query".

Wayne
 
thanks Wayne...I will give it a shot and let you know how it turns out.
 
Hi Wayne...I tried it but it did not work. I am not sure If I am using this right!
I will post some of my code and maybe that will give you a better understanding of what I am trying to do.

Code:
If (IsNull(Forms!FullCompoundDataElementsReport!Combo69) = False) And (IsNull(Forms!FullCompoundDataElementsReport!Combo71) = True) Then
        'If Forms!FullCompoundDataElementsReport![Check84] = True Then
         'stDocName = "Data Element"
         'data_criteria = "[Standard_Data Element Name] like '" & ???????? & "' and "
        'Else
         data_criteria = "[Standard_Cluster Compound Name] like '" & Forms!FullCompoundDataElementsReport!Combo69 & "' and "
         stDocName = "Compound Query"
        'End If
    Else
    data_criteria = "[Standard_Data Element Name] like '" & Forms!FullCompoundDataElementsReport!Combo71 & "' and "
    stDocName = "Data Element"
    End If

the part about check84 (commented out) is where I am confused. When I click that button, data criteria should = all the items in conbo 71. Combo 71 is refined by whatever selection is made in combo69.

Your help would be appreciated
 

Users who are viewing this thread

Back
Top Bottom