Page 1 of 3 123 LastLast
Results 1 to 15 of 34
  1. #1
    dgaletar is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Location
    Washington, DC
    Posts
    85

    Exclamation Continuation - Past Due (30, 60, or 90)

    (https://www.accessforums.net/databas...0-a-21753.html)

    Hello. I am also fairly new to Access, and am completely self taught. I actually have a very similar request; to create a report that shows Vehicle numbers that have not been serviced in the last 30 to 59 days, 60 to 89 days, and over 90 days.

    I tried to use the information above but it didn't work.

    The table that I have the "Service" dates in is surprisingly called "SERVICE". Within that table I have two fields that I assume I will be working with: tb_CUA (which is the vehicle number that we have assigned to it), and Date (which is a list of dates that the vehicle was serviced).

    I created a MACRO like suggested above, and named it "30_60_90", but am a little confused as to what I should be doing next.

    I tried creating both a form and a report and put
    Thats the easiest then in your Form, Report you add a text box and in the control source you put in =IIF(isNull([datepaid]),pastdue(invoicedate),"")
    into the control field of the Text Box, but it keeps returning the value #Name?.



    Any and all suggestions would be GREATLY appreciated!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The original thread doesn't appear to mention a macro. It mentions a function named pastdue, which would need to be copied into a standard module.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    dgaletar is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Location
    Washington, DC
    Posts
    85
    Hey Paul... good to see you again! Somehow your post has managed to confuse me even more! I was so excited to think that I knew what I was doing... knowing where the "Macro" button was, and being able to copy and paste the code into it!

    Now your saying that it says "Module"??? What the heck is a Module? (lol)

    OK, so I opened a new Module, clicked on the "down arrow", and that's it! I'm stuck there! (just when I think I'm making progress...)

    Would you mind dumbing it down for me a bit???

    As always, thanks!!!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Well, I see:

    "In a Module add the following"

    With the database open, hit Alt-F11 which should open the VBA editor. Click on Insert then Module and paste the code there. Name the module anything BUT pastdue, as the module can't have the same name as a sub or function.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    dgaletar is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Location
    Washington, DC
    Posts
    85
    OK, that much is done. I await your next instructions Sir...

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Does it work now?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    dgaletar is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Location
    Washington, DC
    Posts
    85
    No. I created a blank form and added a textbox. In the "Control Source" for that text box I entered "=pastdue([«dtVal»])".

    When I view the form, the same error comes up; #Name?.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you post the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    dgaletar is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Location
    Washington, DC
    Posts
    85
    OK... here she is: Vehicles.zip

    Form1 is the form that I created for this.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    It's an unbound form. It doesn't know what the field is. Either try it on a bound form where that field is available, or use it in a query where that field is present.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Thanks Paul, I'll watch this one now.

  12. #12
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    This thread has a sample db, so jump in if you see a solution.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Did notice one thing Don't know if I rushed in my original post or it was just copied wrong but the statement where the Past Due is 61 to 90 Days should say pastdue = "60 days" not "90 Days"

  14. #14
    dgaletar is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Location
    Washington, DC
    Posts
    85
    Hey guys... sorry about the double posting. I lost the other post for a while so I thought that it might have gotten erased, and then I didn't know how to combine it. I'll only use this one now.

    Ray, I did notice the "60 days" thing and fixed that. Thanks.

    And, this morning I did get this to work... in a way. I created a report in the wizard using the "SERVICE" table. It simply has the CUA# (tb_CUA) and a text box. I used the Module as the Control Source for text box, and it works.

    The problem is that I was looking for a simpler way to get these results. With this method it prompts you to enter a date in order for it to return any results. I was simply looking for a report that would, when run, automatically show you this information from today's date.

    Is that hard to do from here???

  15. #15
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Copy what you put into the control source and post it here. Something's not right.

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Past Due (30, 60, or 90)
    By claysea in forum Database Design
    Replies: 8
    Last Post: 02-11-2013, 03:22 PM
  2. Commiting changes in past records
    By spleewars in forum Programming
    Replies: 3
    Last Post: 04-17-2012, 08:31 AM
  3. Autocop and past when 2 values are the same
    By FuzzFuzz in forum Access
    Replies: 1
    Last Post: 03-07-2012, 10:52 PM
  4. Reviews Past Due
    By Luke in forum Access
    Replies: 5
    Last Post: 07-19-2011, 10:51 AM
  5. Past Due Query
    By sai_rlaf in forum Queries
    Replies: 4
    Last Post: 07-06-2011, 01:53 PM

Tags for this Thread

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