From: Stu on
How do you reference a specific field for update on a continous form?
Suppose I have three fields: ID, F1, F2 and the continuous form may have 20
records. If a user double clicks on F1, I want to place an "X" in field F2
for a subset of the 20 records based on the values in F1. Could someone
provide a code snippet to put an "X" in F2 if F1 has a certain value like
"ABC"?

From: Tom van Stiphout on
On Thu, 27 May 2010 14:18:22 -0700, Stu
<Stu(a)discussions.microsoft.com> wrote:

You could run an Update query. Create this query something like:
update myTable
set F2="X"
where F1="ABC"

Then in F1's DoubleClick event, write:
Currentdb.Querydefs("myQuery").Execute dbFailOnError
(of course you replace myObjectNames with yours)

To show the changes to the underlying table, you may have to requery
the form:
Me.Requery

-Tom.
Microsoft Access MVP



>How do you reference a specific field for update on a continous form?
>Suppose I have three fields: ID, F1, F2 and the continuous form may have 20
>records. If a user double clicks on F1, I want to place an "X" in field F2
>for a subset of the 20 records based on the values in F1. Could someone
>provide a code snippet to put an "X" in F2 if F1 has a certain value like
>"ABC"?