A
angelharp
My search form has an unbound combo box control box named
PartNum (text field) which is for finding a record based
on a value selected. The form displays data from three
linked tables: Part Information, Manufacturers, and Land
Patterns.
I'm using the following code in the AfterUpdate event:
Private Sub PartNum_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PartNum] = '" & Me![PartNum] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Most records show up fine. However, some values I choose
result in display of record with the primary key value
of '1', not the value I've chosen in the combo box.
(Primary Key is PartNum_ID which is an autonumber field)
I have tried using DAO 3.6 and 3.51 out of suspicion that
I was victim of Microsoft Knowledge Base Article #238134,
but I still get the same results.
I've also changed the code inside my subroutine to the
following:
'Move to the record selected in the control
Me.RecordsetClone.Findfirst "[PartNum] = "'" & Me!
[PartNum] & "'"
Me.Bookmark = Me.RecordSetClone.Bookmark
.... and still get the same results.
Anybody know what my problem is?
PartNum (text field) which is for finding a record based
on a value selected. The form displays data from three
linked tables: Part Information, Manufacturers, and Land
Patterns.
I'm using the following code in the AfterUpdate event:
Private Sub PartNum_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PartNum] = '" & Me![PartNum] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Most records show up fine. However, some values I choose
result in display of record with the primary key value
of '1', not the value I've chosen in the combo box.
(Primary Key is PartNum_ID which is an autonumber field)
I have tried using DAO 3.6 and 3.51 out of suspicion that
I was victim of Microsoft Knowledge Base Article #238134,
but I still get the same results.
I've also changed the code inside my subroutine to the
following:
'Move to the record selected in the control
Me.RecordsetClone.Findfirst "[PartNum] = "'" & Me!
[PartNum] & "'"
Me.Bookmark = Me.RecordSetClone.Bookmark
.... and still get the same results.
Anybody know what my problem is?