473,386 Members | 1,668 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,386 software developers and data experts.

Store Old Job Index

I have an amend button which when clicked puts the Job form into
edit. When saved, Access backs up old job information into
'AmendedJobBackUp' table. What I want is to add a new column
'OldJobIndex' in the 'Job' table and have all amended 'JobIndex'
stored in there. How would I go in doing this?

Feb 15 '07 #1
5 1809
er************@gmail.com wrote:
I have an amend button which when clicked puts the Job form into
edit. When saved, Access backs up old job information into
'AmendedJobBackUp' table. What I want is to add a new column
'OldJobIndex' in the 'Job' table and have all amended 'JobIndex'
stored in there. How would I go in doing this?
Hello,

You could do this pretty easily by writing an UPDATE query to copy the
job number to OldJobIndex.

However, this will only store the last (and current) job number. If you
update again, the previous old # will be lost. If you want to keep some
history on this number you should store it in a separate table.

HTH

--
Smartin
Feb 16 '07 #2
On Feb 15, 7:07 pm, Smartin <smartin...@yahoo.comwrote:
eric.nguyen...@gmail.com wrote:
I have an amend button which when clicked puts the Job form into
edit. When saved, Access backs up old job information into
'AmendedJobBackUp' table. What I want is to add a new column
'OldJobIndex' in the 'Job' table and have all amended 'JobIndex'
stored in there. How would I go in doing this?

Hello,

You could do this pretty easily by writing an UPDATE query to copy the
job number to OldJobIndex.

However, this will only store the last (and current) job number. If you
update again, the previous old # will be lost. If you want to keep some
history on this number you should store it in a separate table.

HTH

--
Smartin

Smartin, thats exactly what i want to do. Ive added the new
'OldJobIndex' field to the 'Job' table, buy not sure how to use the
UPDATE in the query.

Feb 19 '07 #3
er************@gmail.com wrote:
On Feb 15, 7:07 pm, Smartin <smartin...@yahoo.comwrote:
>eric.nguyen...@gmail.com wrote:
>>I have an amend button which when clicked puts the Job form into
edit. When saved, Access backs up old job information into
'AmendedJobBackUp' table. What I want is to add a new column
'OldJobIndex' in the 'Job' table and have all amended 'JobIndex'
stored in there. How would I go in doing this?
Hello,

You could do this pretty easily by writing an UPDATE query to copy the
job number to OldJobIndex.

However, this will only store the last (and current) job number. If you
update again, the previous old # will be lost. If you want to keep some
history on this number you should store it in a separate table.

HTH

--
Smartin


Smartin, thats exactly what i want to do. Ive added the new
'OldJobIndex' field to the 'Job' table, buy not sure how to use the
UPDATE in the query.
"thats exactly what i want to do" -- which one? I'm guessing you just
want to keep current and previous number, with no prior history.

The SQL would look something like this:

UPDATE
Job
SET
OldJobIndex = JobIndex
WHERE
<not sure what criteria you want here*>
;

*Probably the criteria will reference the current record specified by
the form. E.g.,

WHERE
Job.JobID = [Forms]![JobForm]![JobID]
^^^^^ ^^^^^^^ ^^^^^

You will need to substitute the correct table field, form, and form
field names above ^.

But I caution again, the OldJobIndex will be bumped out and lost on the
record every time this query executes.

Hope that helps!
--
Smartin
Feb 19 '07 #4
On Feb 19, 5:41 pm, Smartin <smartin...@yahoo.comwrote:
eric.nguyen...@gmail.com wrote:
On Feb 15, 7:07 pm, Smartin <smartin...@yahoo.comwrote:
eric.nguyen...@gmail.com wrote:
I have an amend button which when clicked puts the Job form into
edit. When saved, Access backs up old job information into
'AmendedJobBackUp' table. What I want is to add a new column
'OldJobIndex' in the 'Job' table and have all amended 'JobIndex'
stored in there. How would I go in doing this?
Hello,
You could do this pretty easily by writing an UPDATE query to copy the
job number to OldJobIndex.
However, this will only store the last (and current) job number. If you
update again, the previous old # will be lost. If you want to keep some
history on this number you should store it in a separate table.
HTH
--
Smartin
Smartin, thats exactly what i want to do. Ive added the new
'OldJobIndex' field to the 'Job' table, buy not sure how to use the
UPDATE in the query.

"thats exactly what i want to do" -- which one? I'm guessing you just
want to keep current and previous number, with no prior history.

The SQL would look something like this:

UPDATE
Job
SET
OldJobIndex = JobIndex
WHERE
<not sure what criteria you want here*>
;

*Probably the criteria will reference the current record specified by
the form. E.g.,

WHERE
Job.JobID = [Forms]![JobForm]![JobID]
^^^^^ ^^^^^^^ ^^^^^

You will need to substitute the correct table field, form, and form
field names above ^.

But I caution again, the OldJobIndex will be bumped out and lost on the
record every time this query executes.

Hope that helps!
--
Smartin


Yes, I want to keep the current JobIndex and previous JobIndex under
OldJobIndex with no prior history. I used the sql statement that you
gave me, but Im not sure if Im doing it correctly. Heres what I have:

UPDATE Job
SET OldJobIndex = JobIndex
WHERE Job.OldJobIndex = [Jobs]![JobIndex]![JobID]

When I execute it, I get the enter parameter value box and afterwards
no data is being filled in the tables. Could you tell me what Im
doing wrong? Thanks.
Feb 20 '07 #5
er************@gmail.com wrote:
On Feb 19, 5:41 pm, Smartin <smartin...@yahoo.comwrote:
>eric.nguyen...@gmail.com wrote:
>>On Feb 15, 7:07 pm, Smartin <smartin...@yahoo.comwrote:
eric.nguyen...@gmail.com wrote:
I have an amend button which when clicked puts the Job form into
edit. When saved, Access backs up old job information into
'AmendedJobBackUp' table. What I want is to add a new column
'OldJobIndex' in the 'Job' table and have all amended 'JobIndex'
stored in there. How would I go in doing this?
Hello,
You could do this pretty easily by writing an UPDATE query to copy the
job number to OldJobIndex.
However, this will only store the last (and current) job number. If you
update again, the previous old # will be lost. If you want to keep some
history on this number you should store it in a separate table.
HTH
--
Smartin
Smartin, thats exactly what i want to do. Ive added the new
'OldJobIndex' field to the 'Job' table, buy not sure how to use the
UPDATE in the query.
"thats exactly what i want to do" -- which one? I'm guessing you just
want to keep current and previous number, with no prior history.

The SQL would look something like this:

UPDATE
Job
SET
OldJobIndex = JobIndex
WHERE
<not sure what criteria you want here*>
;

*Probably the criteria will reference the current record specified by
the form. E.g.,

WHERE
Job.JobID = [Forms]![JobForm]![JobID]
^^^^^ ^^^^^^^ ^^^^^

You will need to substitute the correct table field, form, and form
field names above ^.

But I caution again, the OldJobIndex will be bumped out and lost on the
record every time this query executes.

Hope that helps!
--
Smartin

Yes, I want to keep the current JobIndex and previous JobIndex under
OldJobIndex with no prior history. I used the sql statement that you
gave me, but Im not sure if Im doing it correctly. Heres what I have:

UPDATE Job
SET OldJobIndex = JobIndex
WHERE Job.OldJobIndex = [Jobs]![JobIndex]![JobID]

When I execute it, I get the enter parameter value box and afterwards
no data is being filled in the tables. Could you tell me what Im
doing wrong? Thanks.

Hello, I'm guessing a little, but I think maybe you want this for your
WHERE clause:

WHERE Job.JobIndex = [Forms]![Jobs]![JobID]

that is,

WHERE
Job.<table field I want to match to the form=
[Forms]! <-- this is a CONSTANT
[<name of form>]!
[<name of field on form containing the current JobID>]

Let us know!
--
Smartin
Feb 21 '07 #6

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

Similar topics

2
by: Stefan Garde | last post by:
I need to figure out how you store a XML file (and its data) down in a Access database, by the help of SQL. I have tried looking through the net, but havent been very lucky (only found a course...
2
by: forums_mp | last post by:
I've got an STL class (see below) with two functions to store and retrieve data - msg structs. The "Store" function when called will copy the received message (depending on which message) into...
8
by: Jaime Rios | last post by:
Hi, I created a COM AddIn for Word that performs the functions that it needs to, but I needed to add the ability for the toolbar created by the COM AddIn to remember it's last position and...
3
by: Antonio | last post by:
Hi, I want to read an html page written in chinese and store it in a file having extension .aspx , I'm not sure where is the problem, I use the following lines of code: String sAddress =...
5
by: jiangyh | last post by:
hi there: I want debug store process use vs.net.I can't stop store process at breakpoint.how to resolve this. thanks a lot. -- Jiangyh http://bbqb.com/bbs/index.php...
5
by: Michal Táborský | last post by:
I am wondering, if it's effective to use text arrays to store multilanguage information. We used to do it like this: CREATE TABLE product ( id serial NOT NULL, price float4, ... )
33
by: Prasad | last post by:
Hi, Can anyone please tell me how to store a 13 digit number in C language ? Also what is the format specifier to be used to access this variable ? Thanks in advance, Prasad P
13
by: liujiaping | last post by:
Hi, all. I have a dictionary-like file which has the following format: first 4 column 7 is 9 a 23 word 134 .... Every line has two columns....
0
by: JuAn2226 | last post by:
hi this my code Private Sub Form_Load() car_count = 0 Cumulative_Speed = 0 End Sub Private Sub Timer1_Timer() Dim tmpNumber As Integer
9
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
I want to download pfx from my asp.net server, add the pfx to client's X509Store as a trusted publisher, Is it possible? my func in aspx is like this: void InstallCertification() { try{...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
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$) { } ...
0
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...
0
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...
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?
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
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
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...

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.