G
GeoBrooks
Using ACC2000:
In the main form there is an unbound combobox [cbobabyname] used to select
baby records in a subform. If a new baby record is created, the save command
button includes the code to requery the cbo. This works fine. Yet if the
new name is selected the subform opens on the first record in the recordset.
In debug, one can see that the recordcount for the main form recordset has
been incremented, but new record field values are all null. The query on
which the recordset is based will show the correct new values. Performing a
requery on the recordset changes the behavior so that selecting any name
brings up the new record.
cboBabyName_AfterUpdate includes:
Set rs = Me.RecordsetClone
rs.FindFirst "[baby_id] = " & Str(Me![cboBabyName])
If the main form is closed and reopened, all behaves as expected. Surely
there must be a way to get expected results without closing and reopening.
TIA
George
In the main form there is an unbound combobox [cbobabyname] used to select
baby records in a subform. If a new baby record is created, the save command
button includes the code to requery the cbo. This works fine. Yet if the
new name is selected the subform opens on the first record in the recordset.
In debug, one can see that the recordcount for the main form recordset has
been incremented, but new record field values are all null. The query on
which the recordset is based will show the correct new values. Performing a
requery on the recordset changes the behavior so that selecting any name
brings up the new record.
cboBabyName_AfterUpdate includes:
Set rs = Me.RecordsetClone
rs.FindFirst "[baby_id] = " & Str(Me![cboBabyName])
If the main form is closed and reopened, all behaves as expected. Surely
there must be a way to get expected results without closing and reopening.
TIA
George