473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Update table after leaving a record.

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
5 1869
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: fig000 | last post by:
Hi, I have an application that's running fine on development servers (web and database-sql server 2000). I'm updating a record through a third party component but I don't think the component...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
4
by: John Baker | last post by:
Hi: I have two tables, a setup table (TblSetup) and a purchase order table (tblPO). When i construct a query with ONLY the tblPO shown, and a type in parameter for the PO number, I an update...
8
by: Maxi | last post by:
There is a lotto system which picks 21 numbers every day out of 80 numbers. I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21) Here is the structure and sample data: ...
3
by: PAUL | last post by:
Hello, I have 2 datasets I am trying to update. The parent table seems to update fine but when I go update the chiled table I get an error message that says I need a related record in the parent...
5
by: PAUL | last post by:
Hello, I have 2 tables with a relationship set up in the dataset with vb ..net. I add a new record to the parent table then edit an existing child record to have the new parent ID. However when I...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
2
by: Miro | last post by:
I will ask the question first then fumble thru trying to explain myself so i dont waste too much of your time. Question / Statement - Every mdb table needs a PrimaryKey ( or maybe an index - i...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.