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? 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
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. 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
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. 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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 =...
|
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...
|
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,
...
)
|
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
|
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....
|
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
|
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{...
|
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,...
|
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
| |