Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Location
    Plymouth, UK
    Posts
    59

    Unanswered: Copy info from one form to another

    I HAVE TWO FORMS, RUNNING OFF TWO TABLES, ONE IS A QUOTE FORM WHICH INSERTS AN AUTONUMBER AND CODE FOR THE QUOTE AND THEN THE INFORMATION IS RELATIVELY THE SAME,

    I.E.
    UNIT PRICE
    DESCRIPTION
    QUANTITY REQUIRED,
    CUSTOMER NAME
    ADDRESS

    THE INVOICE FORM IS THEN USED WHEN A QUOTE IS ACCEPTED, IS THEIR A WAY BY CLICKING A BUTTON YOU CAN PICK THE DATA OFF THE QUOTE FORM AND DROP IT INTO THE INVOICE FORM AND JUST ADD ANY EXTRA INFO AS REQUIRED, WITH THE INVOICE NUMBER BEING DIFFERENT FROM THE QUOTE NUMBER??

    OR DO I NEED TO CHANGE THE INVOICE AND QUOTE NUMBERS TO BE THE SAME??

    REGARDS

    DAVE

  2. #2
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    In each form, name the controls (see below)
    Make button in frmQuote, and add an 'on click' event.

    'transfer info from frmQuote to frmInvoice.

    docmd.openform "frmInvoice"
    forms!frmInvoice.txtUnitPrice = me.txtUnitPrice
    forms!frmInvoice.txtDescription = me.txtDescription
    forms!frmInvoice.txtQuantity = me.txtQuantity
    forms!frmInvoice.txtCustName = me.txtCustName
    forms!frmInvoice.txtAddress = me.txtAddress

    'perhaps you could do this
    forms!frmInvoice.txtInvoiceNumber = DMax("[your invoice field]", "yourInvoiceTable") + 1

    'notes
    (me can be used frmQuote is the current form)
    (dmax returns the biggest value for a field in a table)
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

Posting Permissions

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