davejackson
Technical User
Hello,
I have two combo boxes, neither of which are bound to a table (so I can move values into them by using the next record buttons). The first one shows all three fields of a table (Bank, City, BankID), the second one only shows the second field (City). Therefore a user can either select the record using a mouse from the first combo box, or type in values into the two boxes. If he/she does this and the combination of the fields from the boxes to not match a record, they are prompted to add a new record in another form which contains a list of all the banks in which cities. This form will automatically assign an autonumber key field to the bank/city combination to give the BankID. After the record has been added, after a requery of the combo box field, the new record is visible by pulling down the first combo box (with the newly assigned BankID) but if l try and move to the new record by using the following code in the AfterUpdate event,
Set rs = Me.Recordset.Clone
rs.findfirst "[BankID] = " & Str(Me![BankID2])
Me.Bookmark = rs.Bookmark
the findfirst cannot find the new record with the newly assigned BankID. I therefore suspect that it is something to do with my Recordset.Clone being taken at an earlier point and so is not up to date enough to find the latest record.
Any help would be brilliant, Thanks in advance,
Dave
I have two combo boxes, neither of which are bound to a table (so I can move values into them by using the next record buttons). The first one shows all three fields of a table (Bank, City, BankID), the second one only shows the second field (City). Therefore a user can either select the record using a mouse from the first combo box, or type in values into the two boxes. If he/she does this and the combination of the fields from the boxes to not match a record, they are prompted to add a new record in another form which contains a list of all the banks in which cities. This form will automatically assign an autonumber key field to the bank/city combination to give the BankID. After the record has been added, after a requery of the combo box field, the new record is visible by pulling down the first combo box (with the newly assigned BankID) but if l try and move to the new record by using the following code in the AfterUpdate event,
Set rs = Me.Recordset.Clone
rs.findfirst "[BankID] = " & Str(Me![BankID2])
Me.Bookmark = rs.Bookmark
the findfirst cannot find the new record with the newly assigned BankID. I therefore suspect that it is something to do with my Recordset.Clone being taken at an earlier point and so is not up to date enough to find the latest record.
Any help would be brilliant, Thanks in advance,
Dave