Connecting Tech Pros Worldwide Forums | Help | Site Map

Update table after leaving a record.

chfran
Guest
 
Posts: n/a
#1: Nov 13 '05
I have a form (continuous form) that based on the underlying query can
be huge or small. When a user updates any part of the record, either
the first, third, or last control, I want to update the record on the
main table. Not just after the control as been updated.

So, how do I update a record when the user leaves the record?

Thanks!

chfran@gmail.com


jv
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Update table after leaving a record.


I believe that the AfterUpdate event of the form (not of the control)
runs after the record has been updated, but before you leave the record.

Br@dley
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Update table after leaving a record.


chfran <chfran@gmail.com> wrote:[color=blue]
> I have a form (continuous form) that based on the underlying query can
> be huge or small. When a user updates any part of the record, either
> the first, third, or last control, I want to update the record on the
> main table. Not just after the control as been updated.[/color]

I'm struggling to understand what you are saying......

Do you mean you want to save the record after a control is edited rather
then when the record looses focus? (eg. you move to another record?). If
this is the case try Me.Refresh VB command.
[color=blue]
> So, how do I update a record when the user leaves the record?[/color]
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response


chfran
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Update table after leaving a record.


In my form there are multiple text boxes that are bound to the table
behind it. Right now the form works like this. A user updates a text
box. It asks them if they are sure they want to update the field. If
they continue to update fields it will ask them after each field or
control. I want it to not ask if they want to update their changes
until they have moved to the next record, then save all the changes the
user has made. Make sense?

chfran@google.com
chfran@msn.com (msn chat)

Br@dley
Guest
 
Posts: n/a
#5: Nov 13 '05

re: Update table after leaving a record.


chfran <chfran@gmail.com> wrote:[color=blue]
> In my form there are multiple text boxes that are bound to the table
> behind it. Right now the form works like this. A user updates a text
> box. It asks them if they are sure they want to update the field. If
> they continue to update fields it will ask them after each field or
> control. I want it to not ask if they want to update their changes
> until they have moved to the next record, then save all the changes
> the user has made. Make sense?
>
> chfran@google.com
> chfran@msn.com (msn chat)[/color]

Why is it asking the user after every field? This is not a standard
behaviour. Find out why it's prompting the user after each field and
remove the macro/code.
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response


jv
Guest
 
Posts: n/a
#6: Nov 13 '05

re: Update table after leaving a record.


Try placing the code in Form's Before Update Event

Private Sub Form_BeforeUpdate(Cancel As Integer)
if vbCancel = msgbox ("Are you sure.....",vbokcancel,"Confirmation")
then
Cancel=True
end if
End Sub

Closed Thread