How to get a report to ask for user selection of data

DougM

Registered User.
Local time
Today, 04:19
Joined
Apr 18, 2004
Messages
26
Ok, I hope this makes some kind of sense. I would like to have a report that when selected will ask the user which one item they would like to see.

example. My database is on different types of materials used in my work. I would like to be able to print out a material "card" every now and then, but I don't want to have to print out a "card" on every material in the database, only on the one that I want at that time. I don't want to have to remember how to spell all the materials (I am lazy), so would like the report to ask me what one material I want (perferable from a drop down selection list).

Is this possible? and how would I do it?

Thanks!
Doug

P.S. I don't know if this should go here or in another area, but it is along the same lines at this question, just reversed. Here it is:

I have a report setup to make small "cards" of the data stored in the database. I have it so that multiple "cards" print on each full sheet of paper (4-6 cards total depending on the amount of data per card). My problem is that it prints 2 of the same card and then 2 of the next and so on. So that instead of having 4-6 individual cards per sheet I have 2-3 cards double printed. Is there anyway to get the report to print/preview them each individually with out doing double?
 
Last edited:
1)Build a query on the data you want to display on the report.
2)Build a form(popup if you like) and use a cbo with the field name you need.
3)Do something like this for a search button on your form:

Code:
Private Sub YourButtonName_Click()
On Error GoTo Err_Report_YourButtonName
    Dim mySearch As String
    mySearch = "[YourFieldName] = '" & Me.YourcboName & "'"
    
    DoCmd.OpenReport "rptName", acNormal, , mySearch
Exit_Report_YourButtonName:
    Exit Sub
Err_Report_YourButtonName:
   Select Case Err
     Case 2501          'Action OpenReport was cancelled.
        MsgBox "No data to display"
        Resume Exit_Report_YourButtonName
     Case Else
       MsgBox Err.Description
       Resume Exit_Report_YourButtonName
   End Select
  Exit Sub
End Sub

There are many ways to do this, this is just an example.....
 

Users who are viewing this thread

Back
Top Bottom