Results 1 to 5 of 5

Thread: Copy Comments

  1. #1
    Join Date
    Dec 2011
    Posts
    3

    Unanswered: Copy Comments

    I have a main form with 2 subforms

    The first subform shows invoices and the second subform shows invoice detail.
    The Invoice subform each record has a check box and
    In the invoice detail subform there is a field for comments. I need to copy the comments written in the invoice detail to other invoices with the user check the box on the invoice subform.

    Any ideas?

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Quote Originally Posted by dewighttaylor View Post
    I need to copy the comments written in the invoice detail to other invoices with the user check the box on the invoice subform.
    Copy to which other invoices?
    Have a nice day!

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    run an update statement which sets the comments for the invoices for that user.
    whether you do that as a d o c m d . r u n s q l (without the sapces!), as a recordset or an execute is up to you

    can't see the business logic mind you. if th ecomment is for all invoices, then it should be at customer level.
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Dec 2011
    Posts
    3
    The comment are copied to late invoices, hence the check marks by the invoice. I know how to set the query up. I just do not know how to write the code for it to update only the check invoices.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    for an update its
    update mytable set mycolumn = avalue where acondition
    eg
    UPDATE invoices
    SET comments = "if you don't pay this bill in full immediately, the boys will be round with the horse's head"
    WHERE datediff("d",invoicedate,day()) >= 30
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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