|
 |
access thread: Compilation Errors
Message #1 by "KennethMungwira" <KennethMungwira@y...> on Tue, 16 Jul 2002 21:38:37
|
|
alot of modules which run in my database are now showing compilation
errors. I have converted from Access 97 to Access 2002, Any suggestions?
Message #2 by "John Ruff" <papparuff@c...> on Tue, 16 Jul 2002 13:48:37 -0700
|
|
It's probably those modules that use recordsets.
1. Make sure you have a Reference to the Microsoft DAO X.X Object
Library
2. Where you have any statements such as
DIM db as Database
DIM rs as Recordset
You need to change them to
DIM db as DAO.Database
DIM rs as DAO.Recordset
If you are using DAO (which I'm almost positive you are using Kenneth).
John V. Ruff - The Eternal Optimist :-)
Always Looking For Contract Opportunities
www.noclassroom.com
Live software training
Right over the Internet
Home: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
9306 Farwest Dr SW
Lakewood, WA 98498
"Commit to the Lord whatever you do,
and your plans will succeed." Proverbs 16:3
-----Original Message-----
From: KennethMungwira [mailto:KennethMungwira@y...]
Sent: Tuesday, July 16, 2002 9:39 PM
To: Access
Subject: [access] Compilation Errors
alot of modules which run in my database are now showing compilation
errors. I have converted from Access 97 to Access 2002, Any suggestions?
Message #3 by "KennethMungwira" <KennethMungwira@y...> on Wed, 17 Jul 2002 16:11:02
|
|
Option Compare Database
Option Explicit
Private Sub cmbStatus_Change()
If Not (IsNull(Me.txtEntry) Or IsNull(Me.txtDaysToComplete)) Then
Me.txtDue = DateAdd("d", Me.txtDaysToComplete.Value, Me.txtEntry)
Else
Me.txtDue = Null
End If
End Sub
After correcting the DAO.Database/Recordset, I compile the database and
an error is shown at the above code. The code is behind the first form
looked at. Highlight "Me.txtEntry".
What do I do?
Message #4 by PStreeter@C... on Wed, 17 Jul 2002 9:59:18 CST
|
|
On Wed, 17 Jul 2002 16:11:02 "KennethMungwira" wrote:
> Option Compare Database
> Option Explicit
>
> Private Sub cmbStatus_Change()
> If Not (IsNull(Me.txtEntry) Or IsNull(Me.txtDaysToComplete)) Then
> Me.txtDue = DateAdd("d", Me.txtDaysToComplete.Value, Me.txtEntry)
> Else
> Me.txtDue = Null
> End If
> End Sub
>
> After correcting the DAO.Database/Recordset, I compile the database and
> an error is shown at the above code. The code is behind the first form
> looked at. Highlight "Me.txtEntry".
>
> What do I do?
Someone can correct me on this if I am wrong. It looks like the
"On Change" proc for a combo box called "Status." You need to find the
control to figure out what to do. In my experience, often I have deleted
the control, but the proc lingers on with references to things that no
longer exist.
Paul
|
|
 |