Issuess with opening form in Access 2013

michal79

Registered User.
Local time
, 00:08
Joined
Nov 27, 2012
Messages
14
Hi,

I have a front end file with all my forms which is linked to a database. I've created it using Access 2010 and there I have no issues opening it. My company has recently updated all computers with new Windows and Office and I'm having issues opening my program in Access 2013.

When I click on my frontend file it opens a splash screen, there's a timer on it and then a small vba DoCmd.OpenForm "frmLogon" is opening my Login form which after updating to Access 2013 isn't working and I'm getting the Run-time error '2501': The OpenForm action was canceled.

When I open the file in Access holding Shit and try to open the form frmLogon from within the Access I'm getting another warning:

The expression On Open you entered as the event property setting produces the following error: Can't find project or library.

The code in the OnOpen event is:

Code:
 Private Sub Form_Open(Cancel As Integer)
DoCmd.Echo False
ShowDbWindow False
DoCmd.RunMacro "mcrHide"

 'On open set focus to combo box

 Me.CboEmployee.SetFocus
DoCmd.Echo True

 End Sub
As mentioned there is no issues when opening the file in Access 2010, no errors. What could be the cause? Anyone experienced something similar? Thanks in advance for all suggestions.

Rgds,
Michal
 
Go into Tools/References in the VBA editor and see if any of the checked references say Missing. Does the code compile?
 
do you have environ() in the query for the form?

I think A2013 objects to this, and the query fails. I had to replace mine with a function to read the environ setting.

other than that - check the references as paul suggested.
 
Go into Tools/References in the VBA editor and see if any of the checked references say Missing. Does the code compile?

Thanks! There was one missing reference, which I un-ticked... and miracleously the Form opened and all is working like it should... so far :)

Greetings,
Michal
 
I presume you didn't really "open the file in Access holding Shit" :)
 

Users who are viewing this thread

Back
Top Bottom