G
Guest
Here's my current AfterUpdate on a ComboBox:
Private Sub cboProductFamily_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
'Stop
rs.FindFirst "[Product_ID] = " & Str(Nz(Me![cboProductFamily], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
...currently working like a charm with two minor problems. First, when the
form opens the Combobox comes up blank, so I am getting a message asking for
Product_ID used elsewhere on the main form.
The MAJOR issue I want to address is the fact that one of the items in the
Product Family table is "*All". As the value of the ComboBox determines what
company names are to be displayed in the Subform that is next in sequence,
you may have guessed that "*All" is the istruction to put them ALL in thar.
In VFP I would expect a construct something like ..
txtSomeVar = IIF(ProductFamily.Product_Family =
"*All",txtSomething,txtSomethingElse)
... and then use txtSomeVar to do the job that was formerly being done by the
exposed value of the ComboBox.
So how do I do this in Access?
Private Sub cboProductFamily_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
'Stop
rs.FindFirst "[Product_ID] = " & Str(Nz(Me![cboProductFamily], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
...currently working like a charm with two minor problems. First, when the
form opens the Combobox comes up blank, so I am getting a message asking for
Product_ID used elsewhere on the main form.
The MAJOR issue I want to address is the fact that one of the items in the
Product Family table is "*All". As the value of the ComboBox determines what
company names are to be displayed in the Subform that is next in sequence,
you may have guessed that "*All" is the istruction to put them ALL in thar.
In VFP I would expect a construct something like ..
txtSomeVar = IIF(ProductFamily.Product_Family =
"*All",txtSomething,txtSomethingElse)
... and then use txtSomeVar to do the job that was formerly being done by the
exposed value of the ComboBox.
So how do I do this in Access?