DoCmd.OpenFOrm not working on new computer

cheesiepoof05

Board Regular
Joined
Dec 30, 2010
Messages
82
We have been using an Access form that you can double click on the results and it opens up another form "FRM_EDIT". I have about 5 computers that use the same thing and haven't had any trouble. Recently we got two more PCs and neither of them do anything when you double click to open the next form. This is the code that I believe is supposed to generate the double click to open "FRM_EDIT".

Private Sub lstViewResults_DblClick()
If IsNull(Me.lstViewResults.SelectedItem) Then Exit Sub
DoCmd.OpenForm "FRM_EDIT", acNormal, ,"[Document Number] = '" & Me.lstViewResults.SelectedItem &"'"
End Sub

Thank you!
 
Still sounds like macros are not enabled on their computer (or as noted above anti-virus is interfering, which amounts to the same thing).
 
Last edited:
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I had this happen to me last year, never got to the exact reason, however I believed it to be due to corruption in the forms code. It worked on some machines but not on others.

I fixed it by -
deleting all the code from that form and saving it.
compacting and repairing the DB
decompiling the DB
adding the code back in to the form
compiling the DB
compacting and repairing again


If you have never decompiled your database - click on Start, Run and enter: msaccess.exe /decompile

Then select the database to decompile and hold shift to bypass startup form or code.
 
Last edited:
Upvote 0
So I have tried a couple additional things and still no success. I changed double-click to single click, verified that my computer now opens the entry with single click, their computer still doesn't do anything. I also put in a pop-up box that pops up when the double click event is kicked off and it worked on mine, but not the new computer again.
This is what makes it sound like macros aren't working at all.

I've verified they are enabled and other macros are working.
How did you do that?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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