473,661 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Last record of Access form not updating in table

43 New Member
Hello all,
I have an issue with a form updating all records in a table except for the very last record for some reason.

A little background, I have an unmatched query that appends results to a table so that the records are updateable. I have a form that is based on this table, where the user updates the invalid fields on a form, and then an update query is ran to update the records in the master table. All of this works great, except for the last record on the form. I can't figure out for the life of me why this is the case. Even when I hit enter after changing the records, the table is not updating.

Does anyone have an idea? I assume it's an easy fix but it's making my brain hurt.

Thank you all!
Jan 31 '14 #1
7 4653
dsatino
393 Contributor
Why not just set the .recordsource of the form to the table and bind the form fields to appropriate table fields. Then you're editing the records directly and don't need the update query.

Basically, you're adding an extra step that's not necessary.
Jan 31 '14 #2
Lynch225
43 New Member
Thanks for the response dsatino...

I should have clarified. I have a form bound to a table, as you suggested. As I update the form, the resulting fields in the table will also update. This works for all records except for the last record for some reason. I then take this table and run an update query to update these specific records into a larger table. I guess I did not need to specify this...

So if the form is bound to the table, why would all records update correctly except the last one? I am confused.

Thanks!
Jan 31 '14 #3
dsatino
393 Contributor
Is the record failing to update in the form bound table, or just in the 'larger' table?
Jan 31 '14 #4
zmbd
5,501 Recognized Expert Moderator Expert
Why the extra step?
Why not bind the form to the larger table to begin with?
You can then use the form's (or control level if needed) before_update event to validate the record before the edit is saved.
Jan 31 '14 #5
Lynch225
43 New Member
Thank you for the responses...

The record is not updating in the bound table, so it's not an issue with the update query.

As far as the reasoning behind not having the form bound to the larger table is that:
1.) I run an unmatched query, which basically shows which records are invalid for a single field. One table imports data from our labor management (non-Access) database. Employees choose certain labor codes to use, so quite often they type in a labor code that does not exist, so the unmatched query finds invalid codes by matching the labor data against a table with all valid codes. The query is then unable to be updated, so that why I chose to append that table to a writable table and update it from there.
2.) The form and bound table are located on a front end, with the large table on a backend. I use this so multiple managers can pull hours at any time and get the most recent hours. I didn't want to have the form on the backend for obvious reasons

Hopefully this helps explain my problem and reasoning a little more. I will continue to try workarounds, but any help is always helpful!
Feb 1 '14 #6
dsatino
393 Contributor
It's probably much simpler than you think. It sounds like the last record isn't updating because the control update event isn't being triggered.

My guess is that your form is continuous and that hitting the enter button moves to the next record, which does trigger the event. On the last record, there is no where to go and so the enter button does nothing.

I'd bet that if you simply take the cursor and select any previous record on the form after you've changed the last record then you'll find that it updates to the table successfully.
Feb 2 '14 #7
Lynch225
43 New Member
Thanks again dsatino...

You were definitely right about pointing the cursor at a previous record for it to update- worked like a charm last night. Of course, when I ran this morning there was only 1 record that showed up haha. I just made a temporary change by changing the Allow Additions property to yes so hitting enter will move to a new record and update the table accordingly.

Much appreciated!
Feb 4 '14 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1516
by: tony bergstrom | last post by:
Ok, so I have a Form. It is a continuous form. In the header one selects what person to view data for. Once the person is selected, the travel information that has been budgeted for the year associated with that person appears below (this is a 3 table, many to many: people travel to locations). The final line of the continuous form is to add new data. I start typing in the name of the destination, and it autocompletes the name if...
2
7969
by: Bill Hand | last post by:
Is it possible to open a form from table and have it access a given record? I want to be able to query all baseball cards with the last name Jones and have it open a table. In each record of the table I have a hyperlink field that opens a form. Now say I have 10 Jones' and I want the form to open up to Andruw Jones not Chipper Jones. Is this possible? This is more of a curiosity question than anything.
1
1829
by: Jason Wood | last post by:
Hi everyone, I've a simple table containing member details. I've written a SELECT to select all the members. I've based the form on this select, using the from wizard. Once built I've disabled the MemberID key field on the form. Changing any of the fields on the form and then exiting the field effectively updates the field on the table.
2
3618
by: Robert | last post by:
I have a label on my form lblCount and the following code in my form for displaying a record count: Private Sub Form_Current() Me.RecordsetClone.Bookmark = Me.Bookmark Me!lblCount.Caption = Me.RecordsetClone.AbsolutePosition + 1 End Sub It works fine until I page to the last record and I get:
1
3365
by: leemansiuk | last post by:
hi, i wonder if anyone can help with this problem i cant seem to work out. i have a bound form linked to an orders table, including some required fields. when i use the navigation buttons of the form to scroll thorugh the orders i can get to the end where the form expects you to make a new order. but i have a button to add a new order. i want to stop the user being able to go past the last record in the orders table. or enable them to...
3
3657
by: mtczx232 | last post by:
I have form that have Datagridview. I want that grid stand on the last record when form open. then user can move down one line to add new record. I not find Property like current_index thet can be set to last record. How I do that?
1
5739
by: chris | last post by:
I have a Switchboard I created that has the program version at the bottom. I have a table with version history in it that I maintain everytime I make changes and release it to the users. Currently I have to update the switchboard field manually as it is an unbound text box. Is there a way that I can have the Field look for the last record in my version table and grab the version field? Thank you, Chris
4
3477
by: aaronyoung | last post by:
I have created custom navigation buttons and Record Number indicators on several forms that are used to review and update records based on a query. My On Current event to update the "Record X of Y" is Private Sub Form_Current() Dim frm As Form, LastRec As Long Set frm = Forms!ReviewSearchRecordsForm
1
2564
LeighW
by: LeighW | last post by:
Hello, I used Allen Browne's method of assigning default values from the last record which is especially helpful when adding a new record to filtered records. Using his method I had to create a module: Public Function CarryOver(frm As Form, strErrMsg As String, ParamArray avarExceptionList()) As Long On Error GoTo Err_Handler 'Purpose: Carry over the same fields to a new record, based on the last record in the form. 'Arguments:...
1
1186
by: shirani79 | last post by:
please simply let me know how could I copy last record to a same table.
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8754
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2760
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.