|
-
Dec 28th, 2005, 06:05 PM
#1
Thread Starter
Addicted Member
-
Dec 28th, 2005, 07:47 PM
#2
Re: Delete Record then Moveing
Are you looking for .MoveLast,.MoveNext,.MoveFirst and .MovePrevious commands?
-
Dec 28th, 2005, 08:10 PM
#3
Thread Starter
Addicted Member
Re: Delete Record then Moveing
Something along the lines of When I delete the record it wont really delete but then it will move it to a different table(like a past records list)
so it will delete from the normal table I have "EMPDATA" and then move to "PastEMPDATA"
Thanks again Dee-u
-
Dec 28th, 2005, 08:23 PM
#4
Re: Delete Record then Moveing
An example...
VB Code:
INSERT INTO Carrier ( CarrierCode, CarrierName, CarrierAdd1, CarrierAdd2, CarrierAdd3, CarrierAdd4, CarrierAdd5 )
SELECT Carrier.CarrierCode, Carrier.CarrierName, Carrier.CarrierAdd1, Carrier.CarrierAdd2, Carrier.CarrierAdd3, Carrier.CarrierAdd4, Carrier.CarrierAdd5
FROM Carrier
WHERE (((Carrier.CarrierCode)=1));
-
Dec 29th, 2005, 01:19 AM
#5
Re: Delete Record then Moveing
Isn't the logic is supposed to be something like this?
VB Code:
Private Sub cmdDelete_Click()
If MsgBox("Are You Sure You Want To Delete This Employee", vbYesNo, "Delete Record") = vbYes Then
'move the record before deleting
rs.Delete
Set rs = db.OpenRecordset("EMPDATA", dbOpenTable)
List
txtFirstName.Text = vbNullString
txtFirstName.Enabled = True
txtLastName.Text = vbNullString
txtLastName.Enabled = True
txtEmployed.Text = vbNullString
txtEmployed.Enabled = True
txtUnemployed.Text = vbNullString
txtUnemployed.Enabled = True
cmdSave.Enabled = True
cmdCancel.Enabled = True
cmdadd.Enabled = True
End If
End Sub
-
Dec 29th, 2005, 01:27 AM
#6
Fanatic Member
Re: Delete Record then Moveing
you want to
copy the employees record from "Present employee DB" or probaly present employee table"
add the employees record to a "past employeeDB" or probaly "past employee Table"
delete employees record from "Present employee DB" or table
-
Dec 29th, 2005, 03:28 AM
#7
Re: Copy Selected Record Then Delete old wile new is in past records db
You know how to add a record in a database right? It's just that, add it to the other table then delete it...
-
Dec 30th, 2005, 08:21 AM
#8
Re: Copy Data from Selected Record and place in new db and table on another form?
I'm very confused on this.
VB Code:
If errormsg = vbOK Then
Set rs = db.OpenRecordset("PastEMPDATA", dbOpenTable)
rs.update then
Set rs = db.Openrecordset("EMPDATA",dbOpenTable)
rs.Delete
What type of objects are PASTEMPDATA and EMPDATA? Those should be SQL queries, but I'm guessing they are not.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|