Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access 2010, code for customer call sheets

    Hey all,

    I have a great call system set up for customers. I have a report set up called "Follow-up Calls" within the database there is a section for "due dates" which I set to follow up with the customer in 2 weeks. I want this report to save to my desktop or print on a specific printer once a day preferably the AM to tell me if I have people to call for that day. I have started a macro but not sure if I am doing this right as I am new at all of this. Below is the code I am trying to use but I keep getting an error that says "Type Mismatch". Any help on a way to do this would be great. I also would like this to run without me having to do it every day. Thanks for any help!


    [Reports]![Follow-up Calls]![Due Date]=Date()

  2. #2
    Star Lounger
    Join Date
    Dec 2009
    Location
    Findlay, Ohio
    Posts
    57
    Thanks
    4
    Thanked 6 Times in 6 Posts
    How about opening the report with a query to filter the date?
    In the query define an extra field for Due Date as duedate1: datevalue([Due Date])
    with a criteria of: DateValue(Date())

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts
    Where to you have this code? You are trying to set the value of a control in the report. What you want is a way to filter the report for the date.

    Look at Help for DoCmd.OpenReport and you will see a Where clause that you can specify. In your case you'd want something like "[Due Date] = Date{}".
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    New Lounger
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, I was trying to make a macro. Like I said I am very new to access, but I am sure there is a way to do this. I created a module and used DoCmd.OpenReport , acViewReport, [Due Date] = Date in Visual Basic and the module is now in my access database. What I need to know how to go from this and get the result to save on my desktop or print every morning.

  5. #5
    Lounger
    Join Date
    Feb 2011
    Posts
    43
    Thanks
    0
    Thanked 6 Times in 6 Posts
    Use Date() in the criteria of the recordsource for the report. Then you don't need to worry about macros or BA.

    As to running the report in the mornings, if you open the database every morning, you could add the report to the Autoexec macro. If not, then you'll need to set up some scheduler to open your Access db.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •