Hello!
I have a ListBox with the name IstCountry were several Countries are in which one can choose (0 to all).
And I got a Button with a code behind, as follows...
'-------------------------------------------------------------------
Private Sub Command57_Click()
Dim Element As Variant
Dim Bedingung As String
Dim Country As Variant
'Ist überhaupt ein Eintrag markiert?
If Me!IstCountry.ItemsSelected.Count = 0 Then Exit Sub
'Bedingung zusammenstellen
For Each Element In Me!IstCountry.ItemsSelected
Country = Me!IstCountry.ItemData(Element)
Bedingung = Bedingung & "Country = " & Country & " OR "
Next Element
'Rechtes OR abschneiden
Bedingung = Left(Bedingung, Len(Bedingung) - 4)
DoCmd.OpenReport ReportName:="Abfrage_issued_cheques_report_o_amount1", WhereCondition:=Bedingung, View:=acPreview
End Sub
'-------------------------------------------------------------------
It all works pretty well .. BUT .. there is a PopUp Window after selecting a country that says "Enter parameter value" then there is the country as I marked it as header and a textfield below wher i have to type that selected country in again to get the report just for that certain contry.
...What do I do wrong?
I want to get rid of that PopUp-Window of course, cause I thought all is properly selected, but as it seems, it is not.
Any idea appreciated
Greetings
..Nils
I have a ListBox with the name IstCountry were several Countries are in which one can choose (0 to all).
And I got a Button with a code behind, as follows...
'-------------------------------------------------------------------
Private Sub Command57_Click()
Dim Element As Variant
Dim Bedingung As String
Dim Country As Variant
'Ist überhaupt ein Eintrag markiert?
If Me!IstCountry.ItemsSelected.Count = 0 Then Exit Sub
'Bedingung zusammenstellen
For Each Element In Me!IstCountry.ItemsSelected
Country = Me!IstCountry.ItemData(Element)
Bedingung = Bedingung & "Country = " & Country & " OR "
Next Element
'Rechtes OR abschneiden
Bedingung = Left(Bedingung, Len(Bedingung) - 4)
DoCmd.OpenReport ReportName:="Abfrage_issued_cheques_report_o_amount1", WhereCondition:=Bedingung, View:=acPreview
End Sub
'-------------------------------------------------------------------
It all works pretty well .. BUT .. there is a PopUp Window after selecting a country that says "Enter parameter value" then there is the country as I marked it as header and a textfield below wher i have to type that selected country in again to get the report just for that certain contry.
...What do I do wrong?
I want to get rid of that PopUp-Window of course, cause I thought all is properly selected, but as it seems, it is not.
Any idea appreciated
Greetings
..Nils