Avatar of DJ P
DJ P
Flag for United States of America

asked on 

Automatically filling a check box via a macro

I have a simple macro (see below) for an access 2013 database that has you can see prompts for a message box to inform the user to select a check box (called "complete trans"). The problem is a good portion of our folks forget to check the box (go figure). What I would like to do is have the box automatically checked once they select ok on the message box. What is the line of code to accomplish this? Below is my macro.

Option Compare Database

'------------------------------------------------------------
' Macro1
'
'------------------------------------------------------------
Function Macro1()
On Error GoTo Macro1_Err

    DoCmd.RefreshRecord
    DoCmd.OpenQuery "Append History Database", acViewNormal, acEdit
    DoCmd.RefreshRecord
    Beep
    MsgBox "UNCHECK THE ""COMPLETE TRANSACTION"" BOX BEFORE PROCEEDING.", vbCritical, "SE-SELECT CURRENT RECORD"

Macro1_Exit:
    Exit Function

Macro1_Err:
    MsgBox Error$
    Resume Macro1_Exit

End Function
Visual Basic.NETMicrosoft OfficeDatabasesMicrosoft Access

Avatar of undefined
Last Comment
Gustav Brock

8/22/2022 - Mon