ExpressMan1
asked on
Combo Box on subform not updating for certain records unless selected twice.
Small DB example attached.
Combo box on subform updates records in conjuction records in main form "frmInvoice" except for the last record in combo box "222211111242"
If record "222211111242" is chosen for a second time it updates to the correct record.
Tried Me.Combo15.Requery in various places but not working.
Private Sub Combo15_AfterUpdate()
Me.RecordsetClone.FindFirs t "[ShipmentID] = " & Me![Combo15]
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
Else
Me.Parent.RecordsetClone.F indFirst "[InvoiceNumber] = " & Me.Combo15.Column(1)
If Not Me.Parent.RecordsetClone.N oMatch Then
Me.Parent.Bookmark = Me.Parent.RecordsetClone.B ookmark
Else
MsgBox "Record Not found!"
End If
End If
End Sub
Invoice-Rev1.zip
Combo box on subform updates records in conjuction records in main form "frmInvoice" except for the last record in combo box "222211111242"
If record "222211111242" is chosen for a second time it updates to the correct record.
Tried Me.Combo15.Requery in various places but not working.
Private Sub Combo15_AfterUpdate()
Me.RecordsetClone.FindFirs
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
Else
Me.Parent.RecordsetClone.F
If Not Me.Parent.RecordsetClone.N
Me.Parent.Bookmark = Me.Parent.RecordsetClone.B
Else
MsgBox "Record Not found!"
End If
End If
End Sub
Invoice-Rev1.zip
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks again to Rey as it was his original code I was using. Interesting how this unusual problem can be solved two totally different ways.