SetValue for fields on a bound subform

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
 
S

Steve Schapel

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top