My database has a section where 'quotes' are created based on a 'follow up' and a 'demo' for a specific 'customer'
I have a form 'frmQuoteLink' with 2 subforms as we have 2 completely different types of quotes that we do. Each record on the subform contains a 'CustRef', 'CustFlwUpID' and a 'CustDemoID'
From these fields I need to create a 'Quote', each quote has to reference the CustRef, CustFlwUpID and CustDemoID, so I have the following code in place to set the filter to these fields and then open the form 'frmQuotes' using this information.
If a quote has already been created, the QuoteID is used to filter instead.
The problem is that when I try to open the form (using a command button), I keep getting an error saying that this property or method is not supported.
Any help would be greatly appreciated as I have to give a presentation on this tomorrow morning
I have a form 'frmQuoteLink' with 2 subforms as we have 2 completely different types of quotes that we do. Each record on the subform contains a 'CustRef', 'CustFlwUpID' and a 'CustDemoID'
From these fields I need to create a 'Quote', each quote has to reference the CustRef, CustFlwUpID and CustDemoID, so I have the following code in place to set the filter to these fields and then open the form 'frmQuotes' using this information.
If a quote has already been created, the QuoteID is used to filter instead.
The problem is that when I try to open the form (using a command button), I keep getting an error saying that this property or method is not supported.
Code:
Dim stDocName As String
Dim strFilter As String
Dim stLinkCriteria As String
If Me.QuoteNumber = "" Or IsNull(QuoteNumber) Then
stDocName = "frmQuotes"
strFilter = "[CustRef] = " & [Forms]![frmQuoteLink]![frmSubQuoteLinkConv]![CustRef] & " AND [CustFlwUpID] = " & [Forms]![frmQuoteLink]![frmSubQuoteLinkConv].[CustFlwUpID] & " AND [CustDemoID] = " & [Forms]![frmQuoteLink]![frmSubQuoteLinkConv].[CustDemoID]
stLinkCriteria = strFilter
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
stDocName = "frmQuotes"
strFilter = "[QuoteID] = " & [Forms]![frmQuoteLink]![CreateQuoteConv]![QuoteID]
stLinkCriteria = strFilter
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Any help would be greatly appreciated as I have to give a presentation on this tomorrow morning