I am trying to make a yes/no box in VBA. I have no idea what I am doing in VBA, so please provide a dumbed down explanation. So far I have this saved in a Module, but I can't get it to run. I get an error that says "Compile error: Wrong number of arguments or invalid property assignment." I have pasted my code below. I have searched and searched google and this seems to be what everyone else uses, but it won't work for me. Please help!! :banghead:
Code:
Sub TeamQueryUpdate()
If MsgBox("Have you updated the Team query with new team numbers?", vbQuestion + vbYesNo + vbDefaultbutton6, "Query Update") = vbYes Then
DoCmd.OpenQuery "teamStructure_MakeTable", acViewNormal, acEdit
Else: MsgBox("Update Team query with new team numbers.", vbOKOnly, "Go Update") = Ok
End If
End Sub