SetValue for fields on a bound subform

  • Thread starter Thread starter Dennis SMITH
  • Start date Start date
D

Dennis SMITH

Hi I need some help here please

I have a form that is used to input data about flights and a bound subform
(datasheet) used to store individual legs for the flights. Leg information
such as distance between the origin and destination, flight time, fuel burn,
etc is stored in a separate table. Now I build an event on double-click in
the origin field on the leg subform that opens a third form based on the leg
data table where a user can search for the required leg and a macro which is
activated by a button push on that third leg data form that sets the values
of the leg information fields on the bound subform based on the
corresponding values on the third form.

Every time I do that Access goes to the first record on the bound subform
and sets values of leg information fields for the first record instead of
setting values of leg information fields for the record from which the open
form event was initially activated.

Please help, how do I make Access go back to the same field/record to set
its value? Thanks a lot!

Dennis
 
Dennis,

Without knowing the details of the macro (i.e. all actions and relevant
arguments), I don't know the answer to your specific question.

But here is an alternative to consider, which may work in your scenario...
instead of jumping out to the 3rd form for the entry of the leg information,
could the user simply select the required leg data from combobox(es) on the
leg subform?
 
Back
Top