How can i update several records for the same company on a Continous Form

C

Chris Asaipillai

OK I have a continous form displaying reminders at different intervals
for various Companies

The form uses a filter based on a check box called UnderPaymentWF (set to 0)

What I would like to do is that when a user clicks on this check box ie to
set it to
-1 for a particular company, then I would like to set ALL records for it
to -1

an example of the data im using as follows:

Company Name Payment reminder PaymentUnderflow
Claim ID
============ ============== =============== ========


Ziadal Trading April 2006 False
00001
Ziadal Trading July 2006 False
00002
Ziadal Trading August 2006 False
00003


So when the user clicks on the PaymentUnderflow check box then all values
are set to True

for Ziadal Trading

Many thanks

Chris
 
M

Marshall Barton

Chris said:
OK I have a continous form displaying reminders at different intervals
for various Companies

The form uses a filter based on a check box called UnderPaymentWF (set to 0)

What I would like to do is that when a user clicks on this check box ie to
set it to
-1 for a particular company, then I would like to set ALL records for it
to -1

an example of the data im using as follows:

Company Name Payment reminder PaymentUnderflow
Claim ID
============ ============== =============== ========


Ziadal Trading April 2006 False
00001
Ziadal Trading July 2006 False
00002
Ziadal Trading August 2006 False
00003


So when the user clicks on the PaymentUnderflow check box then all values
are set to True for Ziadal Trading


If your post is the whole problem, you could use the check
box's AfterUpdate event to run an UPDATE query:

Me.Dirty = False 'Save record first
DbEngine(0)(0).Execute "UPDATE thetable " _
& "SET PaymentUnderflow = True " _
& "WHERE Company = """ & Me.Company & """ " _
& "AND PaymentUnderflow = False"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top