Combo Box Issue  
Author Message
Bartley





PostPosted: Visual Basic for Applications (VBA), Combo Box Issue Top

I have a main form and a sub form linked by cust id

The cust id is a combo box on the main form using the following code

Private Sub Combo31_AfterUpdate()
On Error GoTo ErrorHandler

Dim strSearch As String

strSearch = "[CUSTID_HDW] = " & Chr$(34) & Me![Combo31] & Chr$(34)

'Find the record that matches the control
Me.RecordsetClone.FindFirst strSearch
Me.Bookmark = Me.RecordsetClone.Bookmark


The problem I have is that I have a auto number on the sub form.

If I select a custid from the main form and then select a item in the sub form the auto number creates a new record but if I then select a new custid from the combo box on the main form the auto number on the sub form deletes and the autonumber returns.

Is there any code that I can use to stop this process

Thanks




Microsoft ISV Community Center Forums1