Change to query

  • Thread starter Thread starter thomas.rector
  • Start date Start date
T

thomas.rector

running Access 2003, XP pro sp2

I have a form that I used an onClick event in checkMar field to
change or add a date to the (DatePay) field. I have now added an
update query to set the checkMar field to -1
when billthiscycle field is showing -1. But now my onClick event
doesn't work because I don't use the form to update. My question
is , how do I add the code below to the update query below. I want
the DatePay field to be set to =Now() when I run the query on the
checkMar field.

Private Sub checkMar_Click()
If checkMar = True Then
DatePay = Now
Else
DatePay = Now
End If
End Sub


UPDATE Customers INNER JOIN payForward ON Customers.MemberID =
payForward.MemberID SET payForward.checkMar = -1
WHERE (((Customers.billthiscycle)=-1));

Any direction or code samples is appreciated, thanks !!!

Thomas Rector
 
I think all you need is:
UPDATE Customers INNER JOIN payForward ON Customers.MemberID =
payForward.MemberID SET payForward.checkMar = -1, DatePay = Now()
WHERE (((Customers.billthiscycle)=-1));

If I understand your question correctly.

-Dorian
 

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

Back
Top