By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Update table after leaving a record.

P: n/a
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!

ch****@gmail.com

Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
jv
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.

Nov 13 '05 #2

P: n/a
Br
chfran <ch****@gmail.com> wrote:
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.
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.
So, how do I update a record when the user leaves the record?

--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #3

P: n/a
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?

ch****@google.com
ch****@msn.com (msn chat)

Nov 13 '05 #4

P: n/a
Br
chfran <ch****@gmail.com> wrote:
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?

ch****@google.com
ch****@msn.com (msn chat)


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
Nov 13 '05 #5

P: n/a
jv
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

Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.