Results 1 to 2 of 2
  1. #1
    Join Date
    May 2005
    Posts
    126
    Provided Answers: 1

    Question Unanswered: VBA Help to read the recordset of a form and create new record

    Hi Basically I'm stuck, and need help please

    I am using Access 2007, what I am trying to accomplish is this, when an engineer goes out to a service call, the user will fill in the details of the service call via a form, and set the call status from open to complete

    If I add "Add New Record" button, to the form, this will indeed generate a new record for this customer/machine, but I have lost the detail to the original record set, for I need to calculate the next service date, from the completion date of the previous record

    What I would like if possible!, When the status field is changed from open to complete, I need to read the current form details, create a new record and calculate the next service date e.g. 6 months in the future, and populate the next service date.

    Cheers

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    click new record button
    get the CustID from the form
    create an append query that adds the new record and posts the 6 mos date,

    DateAdd("m",6,txtSvcDate)

    then open the record using the CustID and the next date.

Posting Permissions

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