Hello guys !
I am having a problem with the creation of a dynamic report.
I have a combo box with lots of values , a OK button and a report.
The combo box has to do with music genres (Pop, Rock etc).
I have only one report:
Control_Panel is the Form and ComboReports is the combo box.
When I select a value from the combo, for example "Rock" and I press the OK button :
The program gives me a message box asking me to write a value.
When I write "Rock" in the message box it brings me the correct result.
Do you know what I have to do to overide this message box ?
I want to pass the value "Rock" in my query in report and to load my report.
Thank you.
I am having a problem with the creation of a dynamic report.
I have a combo box with lots of values , a OK button and a report.
The combo box has to do with music genres (Pop, Rock etc).
I have only one report:
Code:
SELECT CDAll.Artist, CDAll.Title, CDAll.Genre, CDAll.RecordLabel, CDAll.YearReleased, CDAll.Format, CDAll.Rare, CDAll.Tracks, CDAll.Price
FROM Genres INNER JOIN CDAll ON Genres.GenresID=CDAll.Genre
WHERE (((Genres.Genres)=[B][Forms]!Control_Panel.ComboReports))[/B]
ORDER BY CDAll.Artist;
When I select a value from the combo, for example "Rock" and I press the OK button :
Code:
Private Sub Preview_Report_Click()
DoCmd.OpenReport "CD Reports", acViewReport
End Sub
When I write "Rock" in the message box it brings me the correct result.
Do you know what I have to do to overide this message box ?
I want to pass the value "Rock" in my query in report and to load my report.
Thank you.
