Passing Data Form One Sub-form To Another Sub-form, Any Version (1 Viewer)

Anis

Registered User.
Local time
Today, 12:15
Joined
Nov 28, 2016
Messages
11
Good Day to All,

I am very new Access. Sorry my English was not good. I Have two Parent table with child table, for Quotation and Invoicing, as shown below.
Once our quote is approved we need to convert the quote for certain line items as invoice. For this I need to select some line items in quotation sub-form and pass the same to invoice form by a button click.

how to copy the selected item in quotation line form to Invoice line form.

Can anyone help me to prove the code for this button click.

Tables:
Quotation(Table) - Parent
Quote Number(Primary)
Quote Date
Customer Name

Quotation Line(Table) - Child
QuoteNumber
S.No
Description
QTY
Unite Price
Select

Invoice(Table) - Parent
Invoice Number(Primary)
Invoice Date
Customer Name

Invoice Line(Table) - Child
Invoice Number
S.No
Description
QTY
Unite Price
 

Attachments

  • Access.jpg
    Access.jpg
    49.4 KB · Views: 44

Ranman256

Well-known member
Local time
Today, 15:15
Joined
Apr 9, 2015
Messages
4,337
you run an append query.
the select query in the append query would take the key from the Master form, and
the QuoteNumber from the Quote subForm.
ALWAYS use the BUILDER for the critieria. It gets the path names you need correct.

like:
forms!MasterFrm!subform!form!txtQuoteNum
 

Anis

Registered User.
Local time
Today, 12:15
Joined
Nov 28, 2016
Messages
11
you run an append query.
the select query in the append query would take the key from the Master form, and
the QuoteNumber from the Quote subForm.
ALWAYS use the BUILDER for the critieria. It gets the path names you need correct.

like:
forms!MasterFrm!subform!form!txtQuoteNum


Thank You Ranman
i Had tried but end with below error
"microsoft access set 0 fields to null due to a type conversion failure"
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:15
Joined
Feb 19, 2002
Messages
43,486
There is no way we can help with debugging unless you post the code and/or query as well as the error.

Shouldn't your Invoice table also include QuoteNumber so you can reference the Quote that originated the Invoice?

Object names including table and column names should not contain embedded spaces or special characters. They should only contain upper and lower case letters, numbers, and the underscore if you need a separator. My personal preference is CamelCase but others prefer the_underscore as a naming style. I don't like having to use the shift key to type the underscore so I only use them for emphasis.
 

Anis

Registered User.
Local time
Today, 12:15
Joined
Nov 28, 2016
Messages
11
There is no way we can help with debugging unless you post the code and/or query as well as the error.

Shouldn't your Invoice table also include QuoteNumber so you can reference the Quote that originated the Invoice?

Object names including table and column names should not contain embedded spaces or special characters. They should only contain upper and lower case letters, numbers, and the underscore if you need a separator. My personal preference is CamelCase but others prefer the_underscore as a naming style. I don't like having to use the shift key to type the underscore so I only use them for emphasis.

Thank you Pat Hartman, hereby I am attaching my database for your reference. hope this will help to get more advise from you
 

Attachments

  • invoice.mdb
    864 KB · Views: 63

Anis

Registered User.
Local time
Today, 12:15
Joined
Nov 28, 2016
Messages
11
Thank you Pat Hartman, hereby I am attaching my database for your reference. hope this will help to get more advise from you

Can any one help me on my request
 

Users who are viewing this thread

Top Bottom