Results 1 to 11 of 11
  1. #1
    efi is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Location
    Larissa, Greece
    Posts
    5

    Question Need help with report filter! Anybody?

    Hello everyone!



    I am Efi and I have been trying to build a database for the last 2-3 weeks. It is a database with products, clients and orders. I must say that I don't know much about access. I had taken a seminar about 12 years ago and that was it. I am really excited, though, trying to build this db. I am enjoying it very much.
    Now, what I want to do is filter a report. To be more specific, I want to enter the name (or part of it) of a client and push a button (maybe... not necessary) to open an existing report that will then be filtered and show the results I requested. I'm sure it is easy for you. The thing with me is that I have no idea of VBA or macro design.
    So, what do you think?

    Thanks in advance, guys!

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    Start learning VBA, it is not that tough
    Also all the help is available in VBA Editor too. Press Alt + F11 to open the editor and use the search box in top right corner
    See below for details
    http://msdn.microsoft.com/en-us/libr...ice.15%29.aspx

  3. #3
    Join Date
    Dec 2014
    Location
    California
    Posts
    1
    I am learning it, that is why i have joined this forum.

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You don't need VBA to accomplish this. The clients will be in a combo box on the form, the user selects which one they want to run the report for. Then in the "Record Source" of the report you include a criteria of the client = "Forms!formname!client"

  5. #5
    efi is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Location
    Larissa, Greece
    Posts
    5
    Thanks a lot everyone!!!

    @aytee111. I understand what you are telling me to do, but I can't get it to work. :-(
    I have created a report, based on a query, that gives me all sales grouped by client and then by date. I am trying to use this one. Is there something different that needs to be done in this occasion?

  6. #6
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Did you put the form client name in the criteria of the query?

  7. #7
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You could also put the filter on when you open the report from the form: DoCmd.OpenReport "rptname",acViewPreview,,"clientfield='" & me!clientbox

  8. #8
    efi is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Location
    Larissa, Greece
    Posts
    5
    Quote Originally Posted by aytee111 View Post
    You could also put the filter on when you open the report from the form: DoCmd.OpenReport "rptname",acViewPreview,,"clientfield='" & me!clientbox
    I tried this one and I get: Run-time error '3075': Syntax error in string in query expression 'ΕΠΩΝΥΜΙΑ='ΓΙΩΡΓΟΣ'.
    (ΕΠΩΝΥΜΙΑ is the Client Name field and ΓΙΩΡΓΟΣ is a client's name.
    Any ideas what I'm doing wrong?

  9. #9
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    There don't seem to be the right quotes = "clientfield='(single quote)"(double quote) & me!client & "'" (double,single,double)

  10. #10
    efi is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Location
    Larissa, Greece
    Posts
    5
    You are so right!!!!! The report opens now. It does not return any results for the client I'm requesting, but maybe it's because of the relationships I have created. I'll check it and get back to you. If anything comes to your mind on that, let me know... :-)
    Thanks a milion aytee111!!!

  11. #11
    efi is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Location
    Larissa, Greece
    Posts
    5
    Problem solved aytee111!
    Thanks a lot!!!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 04-30-2014, 09:40 PM
  2. Replies: 1
    Last Post: 07-25-2013, 01:20 PM
  3. Replies: 2
    Last Post: 05-10-2013, 03:37 PM
  4. Help - trying to Filter on report
    By JulieBright in forum Reports
    Replies: 7
    Last Post: 04-20-2012, 02:35 AM
  5. Report Filter
    By SFC in forum Reports
    Replies: 4
    Last Post: 01-11-2012, 04:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums