G
GVR_Mike
Hi,
I have a form that contains a subform. The subform displays several
rows of detail data (in tabular format) that is related to the current
record on the main form.
Let's say that for a particular record in the main form, there are
three records of detail data. My subform shows those three rows of
detail data, but it also shows a forth row that is empty. If the user
enters a value into
any one of the fields in this row, a record is appended to my detail
table.
I would like more control of how a user appends a new row of detail
data. Ideally, I would like the user not to see any of the fields in
the forth (new) row unless he purposely clicks a button to add a new
row. This way, I
can put code in the On Click event to preload data into certain
fields.
I set the subform as AllowAdditions = False. The user clicks a button
to add a new record. The button On Click code sets AllowAdditions =
True, populates a couple of the fields and sets focus on the field in
which the user will enter data. The problem still remains that when it
sets AllowAdditions = True the blank new record shows up again. Is
there a way to hide this while still allowing the user to enter/edit
in existing records? (By this time I've populated some of the fields
so the subform record is already saved to the table).
I have a form that contains a subform. The subform displays several
rows of detail data (in tabular format) that is related to the current
record on the main form.
Let's say that for a particular record in the main form, there are
three records of detail data. My subform shows those three rows of
detail data, but it also shows a forth row that is empty. If the user
enters a value into
any one of the fields in this row, a record is appended to my detail
table.
I would like more control of how a user appends a new row of detail
data. Ideally, I would like the user not to see any of the fields in
the forth (new) row unless he purposely clicks a button to add a new
row. This way, I
can put code in the On Click event to preload data into certain
fields.
I set the subform as AllowAdditions = False. The user clicks a button
to add a new record. The button On Click code sets AllowAdditions =
True, populates a couple of the fields and sets focus on the field in
which the user will enter data. The problem still remains that when it
sets AllowAdditions = True the blank new record shows up again. Is
there a way to hide this while still allowing the user to enter/edit
in existing records? (By this time I've populated some of the fields
so the subform record is already saved to the table).