Here is the code that is working at the moment, it is in the .AfterUpdate event
Private Sub Frame_InvUpd_Category_AfterUpdate()
Dim strCategory As String
Select Case Me.Frame_InvUpd_Category.Value
Case 1
strCategory = "Long Range"
Case 2
strCategory = "Mid Range"
Case 3
strCategory = "Putt & Approach"
Case 4
strCategory = "Recreational"
Case 5
strCategory = "Specialty"
End Select
Me.Cmb_InvUpd_Prod.RowSource = "SELECT Product.Product_Name " & _
"FROM Product WHERE (((Product.Product_Category) = '" & _
strCategory & "')) ORDER BY Product.Product_Name;"
End Sub
Quote:
|
quote:If you need to have the combo box's rowsource updated for an existing record is displayed with a selected value for an option button, you can put the SQL build statements in a shared function within the form and call it from the AfterUpdate on the buttons and from the Form_Current(). Just be sure that the Form_Current() will only call the function if Me.NewRecord = False.
|
*Watches the words fly over his head* eh?