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

How to manually save form data

How can I manually save information entered on a form onto a table? The form
information is derived from different tables. I want to inter the resulting
information into another table. Please help. Thanks.

--
Message posted via http://www.accessmonster.com

Oct 18 '07 #1
1 5736
On Oct 18, 1:08 pm, "dufnobles via AccessMonster.com" <u37896@uwe>
wrote:
How can I manually save information entered on a form onto a table? The form
information is derived from different tables. I want to inter the resulting
information into another table. Please help. Thanks.

--
Message posted viahttp://www.accessmonster.com
With an unbound form, a Save button or a Save and Exit button is
typical. In its click event you would put something like the
following:

private sub cmdSave_click( )
dim db as database
dim rs as recordset
set db=currentdb( )
set rs=db.OpenRecordset("tblNew",dbOpenTable)
rs.addnew
rs!Name=txtName
rs!Address=txtAddress
rs!Phone = txtPhone
rs.update
rs.close
set rs=nothing
db.close
set db=nothing
End Sub

If the record is not new, but an edit of an existing record, then you
would use rs.edit instead of rs.addnew, and you would have to find the
record first. If it is type dbOpenTable, as is the example, then you
would use a seek statement. Otherwise, if it does not have an index
use a dbOpenDynaset instead of dbOpenTable and use a findfirst
statement.

rs.seek "=",txtName
if not rs.NoMatch then
...
or
rs.findfirst "Name=' " & txtName
if not rs.NoMatch then
...

Oct 18 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or...
2
by: Joe | last post by:
I have a form which displays data in 3 related tables. I want to give the user a prompt to save changes when any field has been modfied on the form. Is there a easy way to do this so the 1 or...
1
by: waddley | last post by:
I have a client who wants to have Access ask to save changes anytime data is changed or added into the database. I'm not really an Access guy, I actually run their servers, but have been dropped...
5
by: C Watson | last post by:
Hi, I'm wondering if anyone can help me with AJAX in ASP.NET 1.1. I have a very specific feature that I would like to use it for. I have a rather long form that the users use to enter data...
0
by: amrhi | last post by:
Hy Guys , Can anybody help me ? I try to make small web database in my unit. Some of fields have on change behaviour to get other data that automatically filled other text field. But when i try to...
2
by: Matuag | last post by:
Hi All, I want to create following command buttons on a Form which users can edit. Save ( Save Changes made) Cancel ( Undo data changes) Exit ( Close form) I am using Macros for each of...
2
by: KC-Mass | last post by:
I have a form that is used to ID and then load Excel files into Access. I use labels on the form to record which file was last loaded. That was accomplished with a simple lblFileLoaded =...
3
by: jeremy.gehring | last post by:
Hey all, OK I'm not much of a PHP programmer; but needs must as they say. I have written AJAX file upload system that uses a PERL CGI script so that a PHP script can get the progress (nifty...
2
by: Cron | last post by:
Hi I'm trying to make a form that makes it optional for the user to save the inputted data. If the user does not tap the save button before leaving the form, the data is silently discarded. This...
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
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...
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
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,...
0
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,...
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.