Access Problem

dr223

Registered User.
Local time
Today, 04:25
Joined
Nov 15, 2007
Messages
219
Hi,

I have an access database which when I try to open it gives me the following problem;

"The expression On Timer you entered as the event property setting produced the following error: The OpenForm action was canceled.

*The expression may not result in the name of a macro, the name of a user defined function, or [Event Procedure].
* There may have been an error evaluating the function, event, or macro.

When I open other applications developed in access they work fine. All my colleagues can open the same application and it opens fine in their PCs. When I log on to another PC and open the application it works fine.

Therefore, the application is fine, so whats wrong? Any ideas how I can resolve the problem..

Thanks
 
Nop same versions
This application used to work before I went for my holidays when I came back it gave me the error really annoying ..
 
When you debug, what line does it highlight in your code?
 
Ok ,

I went to tools> Database Utilities > Compact and Repair database

When I open the database no error is given (this is the mdb version). But it never opens the form.

If I open the mde version I receive th error shown earlier.

It will be important to rectify the mdb problem, its urgent.

Thanks
 
When an error is thrown you would in most cases get a Debug button. Clicking on that will take you to the code line where the error was generated. Does this error message dialog not come with a Debug button?
 
Nop, it doesnt not please see attached the error it prompts me with..
 

Attachments

I dont know, this is an application I use in my work place, Can you direct me to check it please
 
Might be a reference problem too. You could open the database on the machine that has the problem, go to the VBA window and to TOOLS > REFERENCES and see if any are marked missing. If so, uncheck it and close the dialog and then see if it works.

Also, what do you have in the timer event?

(and if you do upload it might be easier for us to troubleshoot as vbaInet said)
 
Found the problem in the Debug

Private Sub Form_Open(Cancel As Integer)
'this code closes projects that have not been paid after a year from their last payment run
'OR... all their patients have been paid and are not outstanding

Dim mySQL As String
mySQL = lblCloseOldProjectsSQL.Caption

Set dBS = DBEngine(0)(0)
Set rST = dBS.OpenRecordset(mySQL, dbOpenDynaset)

With rST
If .RecordCount >= 1 Then

.MoveFirst
While Not .EOF
.Edit
!ProjectStatus = -1
.Update
.MoveNext
Wend

End If

.Close

End With

Set dBS = Nothing
lstProjects.Requery

End Sub


The highlighted is where the error is, can I fix it. The database has highly confidential data and due to company policy unfortunately I can launch it online..
 
What is the caption of this label lblCloseOldProjectsSQL?
 
I dont think the problem is the application,

Ok, I opened the application (mdb) by choosing shift + Open it open the application in the design view ( I could see the tables/queries, forms etc ) I can open anyone of them in the design view.

Therefore, I opened a form in the design view, then right click and optioned to open it in the form view.

a blank grey form was given with File|Window|Help Options

Then I use the drop down in File and selected Exit.

a blank grey form was given with File|Edit|View|Insert|Tools|Window|Help Option
This form will not close unless you select Ctrl+Alt+Del and kill it from the task manager.
I open this application on another PC in works fine, why doesnt it work on my PC


Thanks
 
Last edited:

Users who are viewing this thread

Back
Top Bottom