473,407 Members | 2,315 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,407 software developers and data experts.

Last record of Access form not updating in table

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

✓ answered by dsatino

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.

7 4630
dsatino
393 256MB
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
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 256MB
Is the record failing to update in the form bound table, or just in the 'larger' table?
Jan 31 '14 #4
zmbd
5,501 Expert Mod 4TB
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
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 256MB
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
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
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...
2
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...
1
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...
2
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 =...
1
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...
3
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...
1
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. ...
4
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...
1
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...
1
by: shirani79 | last post by:
please simply let me know how could I copy last record to a same table.
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.