Hi.
I am working on the following process, and I am stuck at the bold faced step:
Take an existing Record, displayed on my form.
alter it save it as a new record
I have been playing around with the following codes
I don't know the syntax, but I would be after something along the lines of
DoCmd.Save as New Record, (Don't change this one) ??
Thanks in Advance.
8 1194
Hi.
I am working on the following process, and I am stuck at the bold faced step:
Take an existing Record, displayed on my form.
alter it save it as a new record
I have been playing around with the following codes
I don't know the syntax, but I would be after something along the lines of
DoCmd.Save as New Record, (Don't change this one) ??
Thanks in Advance.
I can suggest the following. -
-
Private Sub Command4_Click()
-
With DoCmd
-
.RunCommand acCmdSelectRecord
-
.RunCommand acCmdCopy
-
.GoToRecord acActiveDataObject, , acNewRec
-
.RunCommand acCmdPaste
-
End With
-
End Sub
-
-
Thanks. That's getting there, that seems to
create the new record, however it updates the old record as well.
Any thoughts on that?
In what way does the code FishVal posted update your original record?
Thanks. That's getting there, that seems to
create the new record, however it updates the old record as well.
Any thoughts on that?
I've tested this. It works fine at least with two controls on the form: one combo and one text.
Actually it performs old good Copy/Paste. Did you test it?
I think I've figured out what going on! Blair's altering the original record, then running FishVal's code! That's why it updating the original! Blair, you need to run FishVal's code, then alter the new, just created record!
The only problem I see with your code, FishVal, is that I think it'll bomb if any of the controls hold a field that is a Primary Key, as it'll be creating a duplicate.
I just tested it again.
I used the nav arrows to go back to an old record.I have a comments box on my form, and I changed the comment from "test 1" to "test 2". The new record
is generated with the comment "test 2", however the original form/record is changed such that the comment now reads "test 2" as well.
Thanks for thinking about this guys.
yep, you figured it out while i was writing my response. cool.
Sign in to post your reply or Sign up for a free account.
Similar topics
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.
...
|
by: Stuart McGraw |
last post by:
I haven't been able to figure this out and would
appreciate some help...
I have two tables, both with autonumber primary
keys, and linked in a conventional master-child
relationship. I've...
|
by: kaosyeti |
last post by:
i have a form that records 9 fields into a table. on that form i have a
'done' button to close the form. right now, if the form is fully filled in,
but you don't press 'enter' before you click...
|
by: John Kandell |
last post by:
Hi,
I posted this in the asp.net group, but didn't get a response. Maybe someone
here can help me with this...
---
Would someone be able to shed some light on what is the cost of saving a...
|
by: Dixie |
last post by:
I have a spreadsheet that uses VBA code in Access to save itself as a text
file. The line is as follows.
xl.ActiveSheet.SaveAs CurrentProject.Path & "\Reports\" &
DLookup("", "tblButtons",...
|
by: NutsAboutVB |
last post by:
Hello,
I am a .NET programmer and I have a JPEG image file (from digital
camera) of about 109 KB's in size, when I open it and save it
(without making any alterations at all, just going to File...
|
by: JimmyKoolPantz |
last post by:
IDE: Visual Studio 2005
Language: VB.NET
Fox Pro Driver Version: 9.0.0.3504
Problem: I currently have a problem altering a DBF file. I do not get
any syntax errors when running the program. ...
|
by: deekay |
last post by:
I want to allow users to resize and reposition columns of a datasheet
but for a prompt to be brought up and only the layout only to be saved
if they select "save changes". This is the way it works...
|
by: Andy_Khosravi |
last post by:
I'm having a problem with an entry form on one of my applications. It
would appear that the save action is sometimes not working, and is
generating no error when it fails. I'm hoping one of you may...
|
by: darrel |
last post by:
Hi there vb masters i have a problem regrading the saving procedure in my program:
Here my code:
Private Sub cmdSave_Click()
Dim rsShowRec As New ADODB.Recordset
Dim cnn As New...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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
|
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...
|
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...
|
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,...
|
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...
| |