D
DawnTreader
hello
Help
i have a main form with a subform that contains data that i want to search
and goto a specific record. i created a combo find box through the wizard on
a form based on the table that creates my subform and then tried copying and
pasting to the form i really want it on, but the combo box does nothing.
i have a site table that has a one to many relationship with the products
table.
SiteTable
SITEID
SITEADDRESS
ProductsTable
SITEID
PRODUCTID
SERIALNUMBER
the site ID is on the main form and sub form. the mainform is where i need
to place the combo box to find the serial number of the product and have the
mainform and subform move to that product record. how do i do this?
i tried this code:
Private Sub Combo46_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.subfrmtblProductList.Form.Recordset.Clone
rs.FindFirst "[ProductID] = " & Str(Nz(Me![Combo46], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
the subfrmtblProductList is the name of the subform, but the idea i had
doesnt work. do i need to put references to the subform anywhere else? or is
there another approach i need to take when creating this combo box?
thanks in advance.
Help
i have a main form with a subform that contains data that i want to search
and goto a specific record. i created a combo find box through the wizard on
a form based on the table that creates my subform and then tried copying and
pasting to the form i really want it on, but the combo box does nothing.
i have a site table that has a one to many relationship with the products
table.
SiteTable
SITEID
SITEADDRESS
ProductsTable
SITEID
PRODUCTID
SERIALNUMBER
the site ID is on the main form and sub form. the mainform is where i need
to place the combo box to find the serial number of the product and have the
mainform and subform move to that product record. how do i do this?
i tried this code:
Private Sub Combo46_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.subfrmtblProductList.Form.Recordset.Clone
rs.FindFirst "[ProductID] = " & Str(Nz(Me![Combo46], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
the subfrmtblProductList is the name of the subform, but the idea i had
doesnt work. do i need to put references to the subform anywhere else? or is
there another approach i need to take when creating this combo box?
thanks in advance.