473,657 Members | 2,582 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display Results of Last Record Saved in Certain Fields

2 New Member
After saving a record using a form, I want certain fields on the data entry form to display the same information from the previous record.
Oct 12 '06 #1
2 1942
jimatqsi
1,276 Recognized Expert Top Contributor
llucas,
Depends what you mean by "previous." Are you adding a new record, or updating a previously existing record. If you are updating a record, then you can simply
(make sure to check that you're not already at the first record)
rs.MovePrevious or
DoCmd.GoToRecor d , , acPrevious

If you added a new record, you have to go to that record before you can go to the record previous to that:
rst.Bookmark = rst.LastModifie d
then rst.MovePreviou s

Hope that helps,
Jim
Oct 14 '06 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
If you want your new record to display the values in certain fields from the previous record. Before saving you can get the values and put them into variables public to the form class module. Then when you go to new record you can pass the values in the variables to the new record.



After saving a record using a form, I want certain fields on the data entry form to display the same information from the previous record.
Oct 14 '06 #3

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

Similar topics

8
4898
by: Dan Matthews | last post by:
Hey everybody, I have an 2000 Access database that stores job listings from potential employers for a school. I would like to be able to display the date on a webpage the last time the database was updated (inputed through asp natch'). The database is not updated everyday so that won't work but something like the database was updated on Monday 11/24/2003, I would want it to say "New job listings as of Monday, 11/24/2003" if it were...
5
1719
by: Jack | last post by:
Hi, I need to build a asp page where it would serve as a data entry record page as well as display page for records saved. This page should also allow editing of records that has been saved. e.g. SAVEBUTTON SS# EntryBox Name EntryBox Date EntryBox Revenue Generated EntryBox
0
3194
by: elvin | last post by:
Okay - apologize in advance for the length, but I want to make sure all you knowledgeable and helpful people have all the details you need to hopefully point my newbie rear in the right direction. I've got a fairly complex (a lot more complex than originally intended) database with three main tables. The database is designed to track information about certain files. The tables are set up with one to one relationships, primarily because...
15
4653
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any field to start. If I edit that field and then click on the new record button in the navigation buttons, the form goes to a new record and each field has the default value of the previous record. If I put the focus in any field to start, edit that...
3
6946
by: Tom | last post by:
Say a form has a subform, a button that pops up a message box and a cancel button. Q1. If data is entered in one or more fields on the main form and the user then clicks the button that opens the message box, is the record saved? Q2. What is the best way to determine if the main form record has been saved so code could be written to undo the main form if the record has not been saved and delete the record if it has been saved? Q3. ...
2
1804
by: heri | last post by:
Can you please assist me on how to get the 2nd record in case there are 3 or more records of an employee, the query below gets the MAX and MIN BasicSalary. However, my MIN Basic Salary is wrong because I should get the Basic Salary Prior to the 1st Record (DESC)in case there are 3 or more records and not the last Basic Salary of the Last Record. How to GET the 2nd Row of Record in Case that There are 3 or more
3
3124
by: Bob Sanderson | last post by:
I am trying to create a form for a MySQL database similar to a spreadsheet. The idea is to display a list of records, with the last line of the list being an input form. When the user enters data in the form and hits the submit button, the data is entered and the form is reloaded with the new data displayed and another input form becomes the last line. Example --- Before entering new data
36
4769
by: beebelbrox | last post by:
Hi, I am new VB programming in Access and I am requesting help with the following code. WIndows OS MSaccess 2003 This code is attached to an unbound form that will display a specific recordset based in information passed to the form from another form. The problem I am having is that for each of the case statements the proper records (values and Number of records) are being returned but the movement commands do not work or do not display...
3
2834
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one dataset to data in a second dataset, using a common key. I will first describe the problem in words and then I will show my code, which has most of the solution done already. I have built an ASP.NET that queries an Index Server and returns a...
0
8305
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
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7324
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...
1
6163
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
1611
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.