Adding New Records

  • Thread starter Thread starter The Iconoclast
  • Start date Start date
T

The Iconoclast

Greetings.
I have a form-subform that have the following characteristics:
The parent form contains a combo box that upon selecting an item would cause
the subform to display a set of records matching the selection of the combo
box. The subform is viewed as datasheet. The thing is I would like the
record selector (pointer) to immediately move to the end (new record) rather
than it falling unto the first record of the record set.

Thank you.
 
Greetings.
I have a form-subform that have the following characteristics:
The parent form contains a combo box that upon selecting an item would cause
the subform to display a set of records matching the selection of the combo
box. The subform is viewed as datasheet. The thing is I would like the
record selector (pointer) to immediately move to the end (new record) rather
than it falling unto the first record of the record set.

Thank you.

Open the subform in design view, and select its Open event. Click the
.... icon and choose Code Builder; edit the two lines Access gives you
for free to

Private Sub Form_Open(Cancel as Integer)
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

You might need to put similar code in the combo box's AfterUpdate
event:

DoCmd.GoToRecord acForm, Me!subformname.Form.Name, acNewRecord

John W. Vinson[MVP]
 
Back
Top