Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    2

    Lightbulb Unanswered: Send only one time

    Hi everyone reading
    on my program, each wednesday (on opening the database), there is an automatic mail sent to the administrator.

    My problem is that i want that mail to be sent only one time, and not each time someone opens the program on wednesdays....

    i suppose it has sth to matter with a counter, but doesn't know how to write it down.....

    it might be sth as :

    IF today = Wednesday AND counter = 0 then
    send mail
    counter = counter + 1
    ...

    thanks in advance for your help

    Sidrik, France (excuse my english !!)

  2. #2
    Join Date
    Feb 2002
    Posts
    403
    You could use something like
    Private Sub SendMail
    Dim blnMail as Boolean

    blnMail=False

    Call CheckForMail(blnMail)

    if blnMail=False then

    send mail

    end if

    Private Function CheckMail(blnMail) as Boolean

    if Time>timeSerial(9,30,00) then

    blnMail=True

    end if

    In your timer event you would write something like

    Call SendMail

    You could set your timer on opening to say update every 5000 or some other measurement.

    I think this is enough to get you going.

    HTH

Posting Permissions

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