D
deko
I have an Access 2003 mdb using DAO. I have a form with a listbox, some
textboxes, and a few subforms. The Link Child/Link Master fields are set
linking the subforms to the main form, so subforms follow the Customer_ID on
the main form.
When a user clicks on a customer listed in the listbox, I want the
corresponding data in the subforms to move to the record that was selected
in the listbox. So I've been using this:
Dim rst As DAO.Recordset
Dim strCust As String
strCust = "Customer_ID = " & Me!lstCustomer
Set rst = Me.RecordsetClone
rst.FindFirst strCust
If rst.NoMatch Then
MsgBox " Customer Not Found"
Else
Me.Bookmark = rst.Bookmark
End If
Is there any other way to do this? The problem is the rst is getting kind
of big.
I suppose I could assign a new RecordSource to the main form which contains
only the selected record, but then users couldn't use PageUp/PageDown to
scroll through the database... anyway, looking for alternatives...
Thanks in advance.
textboxes, and a few subforms. The Link Child/Link Master fields are set
linking the subforms to the main form, so subforms follow the Customer_ID on
the main form.
When a user clicks on a customer listed in the listbox, I want the
corresponding data in the subforms to move to the record that was selected
in the listbox. So I've been using this:
Dim rst As DAO.Recordset
Dim strCust As String
strCust = "Customer_ID = " & Me!lstCustomer
Set rst = Me.RecordsetClone
rst.FindFirst strCust
If rst.NoMatch Then
MsgBox " Customer Not Found"
Else
Me.Bookmark = rst.Bookmark
End If
Is there any other way to do this? The problem is the rst is getting kind
of big.
I suppose I could assign a new RecordSource to the main form which contains
only the selected record, but then users couldn't use PageUp/PageDown to
scroll through the database... anyway, looking for alternatives...
Thanks in advance.