Form/Subform Controls and Events 
Author Message
 Form/Subform Controls and Events

I have a Form ("A") that has a Subform ("B"). When the
user is finished entering data into B, they click a "Save"
button on "A" to Save the data (and perform a whole bunch
of procedures). The problem is, if the user has not
successfully "tabbed" down to a new record in the subform,
the data (from the last row of data) is not entered
correctly into database table and that wreaks havoc with
what my app needs to do. Is there any why I can trap when
the user leaves the subform (theoretically, before he/she
presses the "Save" button) to make sure the user
has "tabbed" down to a new record and the focus is on the
right control in the subform?

Thanks in advance,

Sean



Wed, 28 Jul 2004 04:59:52 GMT  
 Form/Subform Controls and Events
Maybe a Me.Refresh on the main Form A at the beginning of the Click Event of
the Save button, might help.
Todd


Quote:
> I have a Form ("A") that has a Subform ("B"). When the
> user is finished entering data into B, they click a "Save"
> button on "A" to Save the data (and perform a whole bunch
> of procedures). The problem is, if the user has not
> successfully "tabbed" down to a new record in the subform,
> the data (from the last row of data) is not entered
> correctly into database table and that wreaks havoc with
> what my app needs to do. Is there any why I can trap when
> the user leaves the subform (theoretically, before he/she
> presses the "Save" button) to make sure the user
> has "tabbed" down to a new record and the focus is on the
> right control in the subform?

> Thanks in advance,

> Sean



Wed, 28 Jul 2004 05:31:02 GMT  
 Form/Subform Controls and Events
Sean, something is not right with the way you are describing the
situation.

When you move from a form to a subform or subform to a form a save is
made implicitly - unless you are doing something to prevent it.

In fact unless you don't want the record saved you must intervene
(with code).

Take a look at the forms Before Update event.

On Fri, 8 Feb 2002 12:59:52 -0800, "Sean"

Quote:

>I have a Form ("A") that has a Subform ("B"). When the
>user is finished entering data into B, they click a "Save"
>button on "A" to Save the data (and perform a whole bunch
>of procedures). The problem is, if the user has not
>successfully "tabbed" down to a new record in the subform,
>the data (from the last row of data) is not entered
>correctly into database table and that wreaks havoc with
>what my app needs to do. Is there any why I can trap when
>the user leaves the subform (theoretically, before he/she
>presses the "Save" button) to make sure the user
>has "tabbed" down to a new record and the focus is on the
>right control in the subform?

>Thanks in advance,

>Sean

--
Jim Allensworth

(drop _not)


Wed, 28 Jul 2004 08:59:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. navigating for keyboard users - subfrom to form - subform to subform

2. changing the sourceobject of subform when the form and subform are loaded

3. OnCurrent Event for Subform on Tab Control

4. ActiveX control causing subform's load event not to fire

5. Control name of subform from code behind subform

6. Using a main form to control the edit properties of a subform using VBA

7. Attaching a subform as a control on another form

8. Form/SubForm/Control focus problems

9. Controlling events on an Access Form from a VB form

10. Form Question - Stepping Through Subform Records on Master Form

11. SubForm in Datasheet View Events

12. Ghost OnCurrent event in subform

 

 
Powered by phpBB® Forum Software