Expression in Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 6 fields in a query. All fields come from one source table. If there
is a change to any of those 6 fields weather it be one filed or all 6 fields.
What type of expression can I put into the criteria to catch the change and
update it to another target table. I just need the expression part. I was
thinking under each field some like this..<>[productsTable].[productId] and
under description field..
...<>[productsTable].[Description]and so fourt. Would this work to capture
the changes then use an update query to move the data? Thanks in advance
 
How would you be able to tell if a field was changed in a query? All you
are pulling is the current value for each field. What would you compare it
to?

The only way I know to handle this is in the form. You can create code to
write the old value when a change is made. For more details, search for
previous posts. Look for "audit trail".
 
No if a person updates say a field in a form. I write the query to check and
see if any fileds I palce in my query (from a form) has chaged. If so I run
an update query to update that field. I just want to know how to check and
see if a field has been updated such as the expression I put above.

Rick B said:
How would you be able to tell if a field was changed in a query? All you
are pulling is the current value for each field. What would you compare it
to?

The only way I know to handle this is in the form. You can create code to
write the old value when a change is made. For more details, search for
previous posts. Look for "audit trail".

--
Rick B



troy said:
I have 6 fields in a query. All fields come from one source table. If there
is a change to any of those 6 fields weather it be one filed or all 6
fields.
What type of expression can I put into the criteria to catch the change
and
update it to another target table. I just need the expression part. I was
thinking under each field some like this..<>[productsTable].[productId]
and
under description field..
..<>[productsTable].[Description]and so fourt. Would this work to capture
the changes then use an update query to move the data? Thanks in advance
 
I have no idea what you are trying to do. Sorry, hopefully someone else
will be able to jump in.

You might want to give us an example (in case others are as lost as I am).
What are your fields? What is an example of a record with data in the
fields? If the user tries to change a value in a field, what will you
compare the entry to?


--
Rick B



troy said:
No if a person updates say a field in a form. I write the query to check
and
see if any fileds I palce in my query (from a form) has chaged. If so I
run
an update query to update that field. I just want to know how to check and
see if a field has been updated such as the expression I put above.

Rick B said:
How would you be able to tell if a field was changed in a query? All you
are pulling is the current value for each field. What would you compare
it
to?

The only way I know to handle this is in the form. You can create code
to
write the old value when a change is made. For more details, search for
previous posts. Look for "audit trail".

--
Rick B



troy said:
I have 6 fields in a query. All fields come from one source table. If
there
is a change to any of those 6 fields weather it be one filed or all 6
fields.
What type of expression can I put into the criteria to catch the change
and
update it to another target table. I just need the expression part. I
was
thinking under each field some like this..<>[productsTable].[productId]
and
under description field..
..<>[productsTable].[Description]and so fourt. Would this work to
capture
the changes then use an update query to move the data? Thanks in
advance
 
Back
Top