[AccessD] Update primary key problem

Susan Harkins ssharkins at gmail.com
Thu Nov 6 06:49:30 CST 2014


I'm using a list box in a form's header section to allow users to set the
individual animal for inputting details about existing animals (not a form
for entering new animals). The list box isn't bound.

After selecting the appropriate animal, the main form accept details about
the existing animal. A Save command button and the macro behind it saves
the details, using the animal primary key from the list box as a foreign
key in the details table. That works fine.

I want to retain the value in the animal list box so the user can enter a
second detail record for the same animal -- there can be several "types" of
details.

Using the macro's action, GoToRecord (New), I can quickly reset the detail
controls. However, doing so won't update the detail record's primary key
value though -- the control for that field displays New. If I reselect the
value in the list box, it updates, but I don't want the user to have to
remember to do this.

I'm seriously considering dumping the Save macro so I gain back a little
control over the process. I need to retain the list box value for the next
detail record, and in doing so, reset the individual foreign key. Wondering
about the easiest, most efficient way to do this.

Susan H.


More information about the AccessD mailing list