Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2007
    Posts
    3

    Unanswered: disabling a button

    I need to allow a button to only run once per day. I don't know if I can code to disable this after it's clicked each day or if there is an easier way. Suggestions and code reference is greatly appreciated.

  2. #2
    Join Date
    Feb 2007
    Posts
    348
    keep a table of dates it has been hit. If Date(Now) is in the table, then it is disabled.

    Or

    take the guess work out and write a VB script to run it, then schedule that.

  3. #3
    Join Date
    Nov 2007
    Posts
    3

    button disabling

    I think I am more looking for some sort of code behind that will check to see if that button has been hit in the last 24 hours. I appreciate the input, however. If anyone can give me some coding help, I would appreciate it.

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Get you started

    Here's something to get you started (I did it very quickly though.)
    Attached Files Attached Files
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Feb 2007
    Posts
    348
    you're a nice guy Paul. I was too lazy to do that this morning.
    thanks

  6. #6
    Join Date
    Nov 2007
    Posts
    3
    You're the man! Thank you!

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Thanks. Keep in mind that it needs tweaking.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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