Repeat: Can't add new record

  • Thread starter Thread starter Tammie Jones
  • Start date Start date
T

Tammie Jones

This is a repeat cry for help!

I have a "OrderForm" which contains "Item Buttons" where
a user can choose to add items to a subform
called "OrderDetails". "OrderDetails" is set to display
in Datasheet view. When you click on an "Item Button" it
should then (using a macro) 'set the value' of several of
the fields in the subform "OrderDetails". You should
then, in theory, be able to add as many items as you
would like onto the "OrderDetails" subform, however, I
can't get it to add past one. In other words, if I click
on an "item button" it will update the subform just as it
should.... however, if I click on another item button, it
will just set the value of that same record in the
subform instead of adding another record.

I have "Allow additions" enabled and I am using the Table
itself as the Data Source, not a query. Is there a step
in the macro that I am missing? Is there a way to make
it automatically go to a new record?

Anyone have any ideas?? I'm desperate and out of time!

Thanks
TJones
 
What is the structure of the underlying tables and their
relationships? If you tab your way through the subform
fields, does it eventually get you to a new subform
record? What is the source of the values that are
automatically added to the subform?
Assuming that your Order Details foreign key is linked to
the Orders primary key, what you need to do in a typical
Orders main form / Order Details subform setup is to add
Order details, then add another record to the subform for
the next item in Order Details. Saying that you need
to "set the value" of subform fields does not say enough
to be very helpful. If you are copying fields, you are
most likely doing something wrong. If you need
information from the main form to appear on the subform
for easy reference, you could use a text box on the
subform that references a control on the main form. This
could be part of every subform record, or it could be in
the subform header.
 
Back
Top