Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subforms ...

Status
Not open for further replies.

angelandgreg

Technical User
Sep 20, 2006
106
US
searched but did not find anything.

the issue.

I have a main form. This form contains customer info and an auto generating quote number. (CustomQuotes header)

then there's a subform of the item header information. (customQuotesDetails)

then another subform within the item header subform. (FinishLEvels) so it's a one-to-many from the item to finishlevels. An item can have multi finishlevel options.


the Link from the CustomQuotesDetails to the FinishLevels is on the QuoteID and Item.

1st issue. It kind of works.
It shows me all the finishlevel options to select for the item but only for one of the items for the quote. So say I have two different Items, it only displays finishlevel options for only one of the items.


here's the statement:
SELECT Finishes.FinishLevel, Finishes.FinishingHours, Finishes.Item FROM Finishes INNER JOIN CustomQuoteDetails ON Finishes.Item=CustomQuoteDetails.Item WHERE (((CustomQuoteDetails.QuoteID)=Forms!CustomQuotes!CustomQuotesDetails.Form!QuoteID)) GROUP BY Finishes.FinishLevel, Finishes.FinishingHours, Finishes.Item HAVING (((Finishes.Item)=Forms!CustomQuotes!CustomQuotesDetails.Form!Item)) ORDER BY Finishes.FinishLevel;


Note sure what to do to get my FinishLevels to list the options per Item for the QuoteID?


------------------------------------------
2nd issue - here's the code on the FinishLevels subform
Private Sub FinishLevel_DblClick(Cancel As Integer)
On Error GoTo Err_FinishLevel_DblClick

If IsNull(Me![FinishLevel]) Then
Me![FinishLevel].Text = ""

End If
DoCmd.OpenForm "ItemsFinishLevels", , , , , acDialog, "GotoNew"
Me![FinishLevel].Requery

Exit_FinishLevel_DblClick:
Exit Sub

Err_FinishLevel_DblClick:
MsgBox Err.Description
Resume Exit_FinishLevel_DblClick

End Sub

Private Sub FinishLevel_NotInList(NewData As String, Response As Integer)
MsgBox "Double-click this field to add a new Finish Level to the list."
Response = acDataErrContinue
End Sub

Private Sub FinishLevel_AfterUpdate()
Me![Finish Hrs] = Me![FinishLevel].Column(1)
End Sub


When a FinishLevel is not available the user has the ability to double-click on the FinishLevel field to add a new FinishLevel then back to the subform to select the newest FinishLevel option to the item. I get an error and it takes me to the following code with a Runtime error "3314"

Private Sub FinishLevel_AfterUpdate()
Me![Finish Hrs] = Me![FinishLevel].Column(1)
End Sub



I can't figure these issues out. I am stuck at this point. Please help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top