access forms events not working

mdelghandy

New member
Local time
Today, 21:52
Joined
Dec 7, 2023
Messages
7
I have a blank form in Access. Form events do not work when opening the form. For example, I wrote a code (msgbox) in the double click event, but it doesn't work. Meanwhile, macro access is also active.
 
Might be an idea to post a bit more information.

What if you made a small MS Access App so that we can test it .....

I would have thought a message box would have worked, but it might depend on how you are calling it.

Extract from my website:-
Now you could be forgiven for expecting that a value passed into a form would be available for the form’s events to use. However it’s not!

See my website below for more information:-

 
Is that the only event that isn't working?
Is the event property set to [Event Procedure]
 
crosspost
lots of questions asked and suggestions made here

 
Last edited:
Most form events do not work. For example, I want the user to get a message by double-clicking in the middle of the form. I write the code in the double-click event section of the form, but when I open the form, it does not react to the double-click event
 
If you create a Form event it will never fire in the middle of the form. Needs to be a section level event. Ensure it is a Detail level event.
 
Most form events do not work. For example, I want the user to get a message by double-clicking in the middle of the form. I write the code in the double-click event section of the form, but when I open the form, it does not react to the double-click event
Not all form level events will fire if there are controls that have the focus. double-click is likely one of them.

If you want people to test your code, you need to post a database that includes the code that "doesn't work.
 
See the op’s other thread (see link in post#4) for an image of the form- either the form has no controls or recordset is returning no records and is not allowing additions

I suspect the former
 
I responded to his other thread and pointed out that starting multiple threads on the same topic is unlikely to do anything except annoy experts for wasting their time.
 
Given the lack of response from the OP other than to repeat the question, I suspect this is all going nowhere fast.
 
Most form events do not work. For example, I want the user to get a message by double-clicking in the middle of the form. I write the code in the double-click event section of the form, but when I open the form, it does not react to the double-click event
Fo my DC event for the form to work, I had to DC on the record indicator?
1702123338137.png

Private Sub Form_DblClick(Cancel As Integer)
MsgBox "Double Click event"
End Sub
 
One problem. If you have a form with a non updateable query, and there are no records to display, you might find that lots of controls don't work as you expect.
 

Users who are viewing this thread

Back
Top Bottom