Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2002
    Location
    MA
    Posts
    24

    Question Unanswered: using sendobject based on dateadd value

    G morning all,

    OK I am back with my dateadd function again. Got my dateadd function working in a parameter query now. This query looks at maintenance of equipment due between two dates. The due date is calculated ith the dateadd function.

    What I would like to do is use sendobject to mail the appropiate people if the datedue value (calculated via dateadd) is equal to the current system date "Date()".

    Is this possible / relatively easy to do?

    Thanks to all in advance

    Tim

  2. #2
    Join Date
    Sep 2002
    Location
    MA
    Posts
    24

    Lightbulb another option

    On another thought,

    I do currently have work order requests submitted via a form using sendobject to email the appropiate people when a new request is submitted.

    I would love maintenance due via the value of the dateadd field to perform an append the workorder table as new request and send the email.

    Of course the current sendobject os attached to a form submitted record. Is it possible to attach it to a new record added on the table level. and If so how do you base the append query on the dateadd value.

    Tim

  3. #3
    Join Date
    Sep 2002
    Location
    MA
    Posts
    24

    Lightbulb making progress

    Hey again,

    Ok ive created an append query that updates the work order table on the date of maintenance scheduled. Problem is if I use autoexec to run it automatically then it appends the table with the same records evrytime it opens (duplicate records in a given day). I would like to make this auto for end users. Any suggestions? Maybe run it once then attach it to the appropiate update or new record event on the form?

    Here's the sql behind the query.

    Begin Code--------
    INSERT INTO tblWorkOrder ( numAssetTag, dtmDue, strSvcType, strAssignedTo, strReqBy )
    SELECT qryMntc.idsAssetTag, qryMntc.dtmDateMntcDue, qryMntc.strMntcType, qryMntc.strByCompany, "Auto Attendant" AS strReqBy
    FROM qryMntc
    WHERE (((qryMntc.dtmDateMntcDue)=Date()));
    End Code---------------

    thanks

    Tim

  4. #4
    Join Date
    Sep 2002
    Location
    MA
    Posts
    24
    Ok thought i would post an update for others who may find this info usefull.

    I've ended up creating a bln field called appended in the maintenance hx table. By default this field is set to no/false. Autoexec now runs the append query based on <= Daqte() and the value of "no" in the appended field. Autoexec then runs an update query and changes all no values to yes in this field. Hence records are not appended twice to the work order table.

    Now all I have to do is add something to the form for "changes" to existing work order records.

    Tim

Posting Permissions

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