I have 2 combo boxes, "findRecord" retrieves record based on "SRM No", the other "Type" which has several types like "Cert";"Report";"MSDS";"....
Some records have duplicate "SRM No" with different types. for example: 114p Cert and 114p MSDS....
When user search the record with dup "SRM No", the type combo box is supposed to reflect the exact type on the table.
But the type combo box doesn't work properly, it always shows the first type on the value list. If user select 114p MSDS, the type combo box always shows Cert, instead of MSDS.
While other unique ID# records do not have this problem, they show whatever type they are assigned to. I don't have the option to change those dup "SRM No" records to unique "SRM No".
How did I fix this problem? Thanks.
The following is my code:
Private Sub FindRecord_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[SRM No] = '" & Me![FindRecord] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Row Source for Type combo box: "Cert";"Report";"MSDS"
Some records have duplicate "SRM No" with different types. for example: 114p Cert and 114p MSDS....
When user search the record with dup "SRM No", the type combo box is supposed to reflect the exact type on the table.
But the type combo box doesn't work properly, it always shows the first type on the value list. If user select 114p MSDS, the type combo box always shows Cert, instead of MSDS.
While other unique ID# records do not have this problem, they show whatever type they are assigned to. I don't have the option to change those dup "SRM No" records to unique "SRM No".
How did I fix this problem? Thanks.
The following is my code:
Private Sub FindRecord_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[SRM No] = '" & Me![FindRecord] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Row Source for Type combo box: "Cert";"Report";"MSDS"