Access Button On_Click VBA Error

Mac1206

Board Regular
Joined
Jun 3, 2016
Messages
184
I have this button and what I'm trying to do is make it auto-populate the Move, Paid, and Complete check boxes when the form is filtered...The button works but I get a VBA error -21473552567 (800020009) on Me.Completed = Me.Moved And Me.Paid...Any suggestions?


Private Sub BtnMMMComplete_Click()

DoCmd.OpenQuery "Update_TSMMMComplete"
Me.Completed = Me.Moved And Me.Paid


End Sub
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
So, are “Completed”, “Moved”, and “Paid” just check boxes that you when checked then the button is clicked? If so, then try:
VBA Code:
Private Sub BtnMMMComplete_Click()

    DoCmd.OpenQuery "Update_TSMMMComplete"
    Me.Completed = True
    Me.Moved = True
    Me.Paid = True

End Sub
 
Upvote 0
You are welcome.
 
Upvote 0

Forum statistics

Threads
1,221,544
Messages
6,160,428
Members
451,645
Latest member
androidmj

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top