mike60smart
Registered User.
- Local time
- Today, 11:00
- Joined
- Aug 6, 2017
- Messages
- 1,914
Hi Everyone
I have a Main Form named "frmQuotes"
With a subform named "frmQuotePartNoSubForm" whose Record Source is "tblQuotationPartNo" which displays as follows:-
The fields in the table are :-
QuotePartNoID - PK
QuoteID - FK
PartNo - Text
I have some VB on a Command Button which generates a New Quote with a Revision letter.
This works just fine and creates a new record with the new revision.
What I am trying to do is append the Part No's to tblQuotationPartNo but with a new QuoteID
that has been obtained by using the following Reference in an Unbound Textbox named txtQuoteID:-
=[Forms]![frmQuotes]![frmQuotationPartNosubform].[Form]![LastOfQuoteID]
The Record Source of the Form "frmQuotationPartNosubform" is as follows:-
I have tried to make this process as clear as possible and hope you are following.
How can I do this by using a Command Button on either the Main Form or Subform ?
Any help appreciated
I have a Main Form named "frmQuotes"
With a subform named "frmQuotePartNoSubForm" whose Record Source is "tblQuotationPartNo" which displays as follows:-
The fields in the table are :-
QuotePartNoID - PK
QuoteID - FK
PartNo - Text
I have some VB on a Command Button which generates a New Quote with a Revision letter.
This works just fine and creates a new record with the new revision.
What I am trying to do is append the Part No's to tblQuotationPartNo but with a new QuoteID
that has been obtained by using the following Reference in an Unbound Textbox named txtQuoteID:-
=[Forms]![frmQuotes]![frmQuotationPartNosubform].[Form]![LastOfQuoteID]
The Record Source of the Form "frmQuotationPartNosubform" is as follows:-
Code:
SELECT TOP 1 Last(tblQuotation.QuoteID) AS LastOfQuoteID FROM tblQuotation ORDER BY Last(tblQuotation.QuoteID) DESC;
I have tried to make this process as clear as possible and hope you are following.
How can I do this by using a Command Button on either the Main Form or Subform ?
Any help appreciated