"A problem occurred while Microsoft Access..."

G

Guest

I am getting the following error message:

"The expression On Load you entered as the evet property setting produced
the following error: A problem occured while Microsoft Access was
communicating with the OLE server or ActiveX Control.

*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."

The OnLoad for my form is:
Dim delI As String
Dim aCat As String

delI = "DELETE * FROM tempInputR"
aCat = "INSERT INTO CatSet ( CatDesc, UU, CatId ) " & _
"SELECT tblCategories.CatDesc, IIf([tblCFSGF].[CFUnitUsage] Is
Null," & _
"IIf([tblCLASGF].[CFUnitUsage] Like '1000
Sq.Ft.','Sq.Ft.',[tblCLASGF].[CFUnitUsage])," & _
"IIf([tblCLASGF].[CFUnitUsage] Is
Null,IIf([tblCFSGF].[CFUnitUsage] Like '1000 Sq.Ft.'," & _
"'Sq.Ft.',[tblCFSGF].[CFUnitUsage]),IIf([tblCLASGF].[CFUnitUsage]
Is Null,IIf([tblCFSGF]." & _
"[CFUnitUsage] Like '1000
Sq.Ft.','Sq.Ft.',[tblCFSGF].[CFUnitUsage]),IIf([tblCFSGF]." & _
"[CFUnitUsage] Like
[tblCLASGF].[CFUnitUsage],IIf([tblCFSGF].[CFUnitUsage] Like " & _
"'1000
Sq.Ft.','Sq.Ft.',[tblCFSGF].[CFUnitUsage]),IIf([tblCLASGF].[CFUnitUsage] " & _
"Like '1000 Sq.Ft.','Sq.Ft.',[tblCLASGF].[CFUnitUsage]) & '/' &
IIf([tblCFSGF]." & _
"[CFUnitUsage] Like '1000
Sq.Ft.','Sq.Ft.',[tblCFSGF].[CFUnitUsage]))))) AS UU, " & _
"tblCategories.CatID " & _
"FROM tblCFSGF RIGHT JOIN (tblCLASGF RIGHT JOIN tblCategories ON
tblCLASGF.CFSGFIDNo " & _
"= tblCategories.CLAID) ON tblCFSGF.CFSGFIDNo =
tblCategories.DistrictID;"

Form.Caption = ":: N E W C o n n e c t i o n F e e A p p l i c a t
i o n ::"

CurrentDb.Execute aCat
Me.subform_App.Visible = False
Me.subform_Appli.Visible = True
Me.sfRI.Visible = False
Me.sfOwner.Visible = False
Me.cboAPN.Visible = True
Me.cboDist.Visible = True
Me.dteTrans.Visible = True
Me.cboTrib.Visible = True
Me.cboAppID.Visible = True
Me.lblAppR.Visible = False
Me.lblParcelR.Visible = True
Me.lblParcel_sR.Visible = False
Me.lblOwnerR.Visible = False
Me.lineOwner.Visible = False
Me.lineParcel.Visible = False
Me.lineAppli.Visible = False
Me.lineParc.Visible = True
CurrentDb.Execute delI


I've been building this DB for the past few weeks and this error has never
occured before. I was changing some other code in the Form when I went to
test it and all of a sudden this error pops up.

Steps I've tried (error still there afterwards):
1. Compact & Repair DB
2. Remove the OnLoad code completely from VBA, and remove [Event Procedure]
from the form's property window for OnLoad.

I really don't want to have to rebuild this form.

Can any one help?

Thanks,

Matt
 
G

Guest

Miraculously the problem fixed itself. I closed the database, and re-opened
it. There was no error when opening the form.

I have no clue how it happened.

-Matt

Matt said:
I am getting the following error message:

"The expression On Load you entered as the evet property setting produced
the following error: A problem occured while Microsoft Access was
communicating with the OLE server or ActiveX Control.

*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."

The OnLoad for my form is:
Dim delI As String
Dim aCat As String

delI = "DELETE * FROM tempInputR"
aCat = "INSERT INTO CatSet ( CatDesc, UU, CatId ) " & _
"SELECT tblCategories.CatDesc, IIf([tblCFSGF].[CFUnitUsage] Is
Null," & _
"IIf([tblCLASGF].[CFUnitUsage] Like '1000
Sq.Ft.','Sq.Ft.',[tblCLASGF].[CFUnitUsage])," & _
"IIf([tblCLASGF].[CFUnitUsage] Is
Null,IIf([tblCFSGF].[CFUnitUsage] Like '1000 Sq.Ft.'," & _
"'Sq.Ft.',[tblCFSGF].[CFUnitUsage]),IIf([tblCLASGF].[CFUnitUsage]
Is Null,IIf([tblCFSGF]." & _
"[CFUnitUsage] Like '1000
Sq.Ft.','Sq.Ft.',[tblCFSGF].[CFUnitUsage]),IIf([tblCFSGF]." & _
"[CFUnitUsage] Like
[tblCLASGF].[CFUnitUsage],IIf([tblCFSGF].[CFUnitUsage] Like " & _
"'1000
Sq.Ft.','Sq.Ft.',[tblCFSGF].[CFUnitUsage]),IIf([tblCLASGF].[CFUnitUsage] " & _
"Like '1000 Sq.Ft.','Sq.Ft.',[tblCLASGF].[CFUnitUsage]) & '/' &
IIf([tblCFSGF]." & _
"[CFUnitUsage] Like '1000
Sq.Ft.','Sq.Ft.',[tblCFSGF].[CFUnitUsage]))))) AS UU, " & _
"tblCategories.CatID " & _
"FROM tblCFSGF RIGHT JOIN (tblCLASGF RIGHT JOIN tblCategories ON
tblCLASGF.CFSGFIDNo " & _
"= tblCategories.CLAID) ON tblCFSGF.CFSGFIDNo =
tblCategories.DistrictID;"

Form.Caption = ":: N E W C o n n e c t i o n F e e A p p l i c a t
i o n ::"

CurrentDb.Execute aCat
Me.subform_App.Visible = False
Me.subform_Appli.Visible = True
Me.sfRI.Visible = False
Me.sfOwner.Visible = False
Me.cboAPN.Visible = True
Me.cboDist.Visible = True
Me.dteTrans.Visible = True
Me.cboTrib.Visible = True
Me.cboAppID.Visible = True
Me.lblAppR.Visible = False
Me.lblParcelR.Visible = True
Me.lblParcel_sR.Visible = False
Me.lblOwnerR.Visible = False
Me.lineOwner.Visible = False
Me.lineParcel.Visible = False
Me.lineAppli.Visible = False
Me.lineParc.Visible = True
CurrentDb.Execute delI


I've been building this DB for the past few weeks and this error has never
occured before. I was changing some other code in the Form when I went to
test it and all of a sudden this error pops up.

Steps I've tried (error still there afterwards):
1. Compact & Repair DB
2. Remove the OnLoad code completely from VBA, and remove [Event Procedure]
from the form's property window for OnLoad.

I really don't want to have to rebuild this form.

Can any one help?

Thanks,

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top