Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2007 Combobox's in Form to generate the Report

Status
Not open for further replies.

josh2008

Technical User
Feb 28, 2008
36
US
Okay this is what Got

Form name=Comic_Filter
it has two comboboxes the 1st is "titleName" and the second is artistName. Both drop down boxes have a list of titles and artist in them. I would the user to be able to first select the title he wants then select the artist he wants, click the command Button and tada the "Comic_List" report i created pops up with that SPECIFIC information that was inputted. The following is my code for the command button (PS I am not a coder this is for a database I am designing in school, I have not been taught code just a dumb class on code design. Any help would be awesome!)
------------------------------------------------------------
Option Compare Database

Private Sub Command10_Click()
Dim DocName As String
Dim stFilter As String
Dim lgtitlename As String
Dim lgartistname As String

stDocName = "Comic_List"
stWhere = "[" & Me!titleName & "]=" & Me!titleName & ""
stWhere = "[" & Me!artistName & "] =" & Me!artistName & ""
DoCmd.OpenReport stDocName, acPreview, , strFilter = Forms!Comic_Filter!titleName & artistName
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
End Sub
------------------------------------------------------------
If i do not select any options in the comboboxes and push the command button the report will generate all data! If I select specific criteria "Superman" for titleName and then "Jim Lee" for artistName, the report will pop up but there is nothing in it. I am actually pleased I have gotten it to work thus far becuase like i said i am not a coder. Thanks in advance for any help I can get! :)
J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top