1-i inserted button on my access form and created an ON_CLICK event procedure
2- created the following VBA code
Private Sub Command77_Click()
MsgBox ("hellow")
MsgBox "ppppp"
End Sub
3- The message Box does not appear when i press the button....
1-i inserted button on my access form and created an ON_CLICK event procedure
2- created the following VBA code
Private Sub Command77_Click()
MsgBox ("hellow")
MsgBox "ppppp"
End Sub
3- The message Box does not appear when i press the button....
You wrote that from scratch or created the event from the property sheet? If from scratch the code may not be connected to the event. Regardless, if you go to the property sheet, select the button in design view, is [Event Procedure] showing there for the click event? If not, choose that from the drop down then click on the ellipses (...)Code:Private Sub Command77_Click() End Sub
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
i added the button to my form, then BUILD EVENT, then i typed the following code..
Private Sub Command78_Click()
MsgBox "its works"
End Sub
then FILE/SAVE
Then opened form in FORM MODE
But even this code isnt working
Upload the db.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Don't know if it's a version thing or what, but I don't see a "BUILD EVENT" option - so yeah, post the db. See "how to attach files" at the top of this page if you need it.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Also make sure that either the db is in a trusted location or you've explicitly enabled code to run.
You could also start learning to debug your code, as you are going to need that sooner than later.
https://www.youtube.com/watch?v=6UIypRy1iE8&t=48s
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba