Runtime 438 error

M

MFulton

Hi everyone, I am new to this site and new to access all together. My
problem is, there are probably about 10 people at my place of employment that
have access to this particular database, and there haven't been any problems.
I recently re-installed an operating system(Windows2000) due to a hard drive
crash and the lady who uses the computer get the runtime 438 error whenever
she tries to open a report within the database. If she goes on somebody
elses computer she has no problem opening the report. Basically, what I am
asking is does anybody know why the database and reports work fine on other
computers and not on her computer, could there possibly be something that I
forgot to install or update. By the way, we are running access 97 (Yes, I
can't believe it either), but we will be converting to 2003 in a few months.
Anyone's help is appreciated.
 
D

Douglas J Steele

Anytime something works on some machines or not on others, or suddenly stops
working on a given machine, the first thing to suspect is a problem with the
References collection.

Open any code module, then select Tools | References from the menu bar.
Examine all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

If that doesn't solve the problem, then you're going to have to find exactly
what line of code is causing the problem. It's possible, for example, that
there's something in the code that's using Late Binding to automate some
application, and her machine doesn't have the same version of the
application that's being automated as she used to.
 
M

MFulton

Thanks for responding Douglas, I had already tried that method, but it still
doesn't work. When it gives me the Runtime 438 error and I click Debug, is
gives me the following:

Private Sub Form_Load()
Calendar.Day = Day(Date)
Calendar.Month = Month(Date)
Calendar.Year = Year(Date)
field = 0
If Single_Date = True Then
End_Date.Enabled = False
End If
End Sub

There is a yellow error pointing at the Calendar.Day = Day(Date)

Instead of bringing up the runtime error on all of the other computers it
brings up a small calendar that we type in date ranges to bring up reports
when it is working properly. If anybody can help I would really appreciate
it. Thanks in Advance.
Anytime something works on some machines or not on others, or suddenly stops
working on a given machine, the first thing to suspect is a problem with the
References collection.

Open any code module, then select Tools | References from the menu bar.
Examine all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

If that doesn't solve the problem, then you're going to have to find exactly
what line of code is causing the problem. It's possible, for example, that
there's something in the code that's using Late Binding to automate some
application, and her machine doesn't have the same version of the
application that's being automated as she used to.
Hi everyone, I am new to this site and new to access all together. My
problem is, there are probably about 10 people at my place of employment that
[quoted text clipped - 8 lines]
can't believe it either), but we will be converting to 2003 in a few months.
Anyone's help is appreciated.
 
D

Douglas J Steele

What's Calendar? I assume it's a calendar control, but which one?

I'd assume there's some difference with the Calendar control on her machine.

To completely avoid such problems with Calendars, consider using the all-API
one Stephen Lebans has at http://www.lebans.com/monthcalendar.htm

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


MFulton said:
Thanks for responding Douglas, I had already tried that method, but it still
doesn't work. When it gives me the Runtime 438 error and I click Debug, is
gives me the following:

Private Sub Form_Load()
Calendar.Day = Day(Date)
Calendar.Month = Month(Date)
Calendar.Year = Year(Date)
field = 0
If Single_Date = True Then
End_Date.Enabled = False
End If
End Sub

There is a yellow error pointing at the Calendar.Day = Day(Date)

Instead of bringing up the runtime error on all of the other computers it
brings up a small calendar that we type in date ranges to bring up reports
when it is working properly. If anybody can help I would really appreciate
it. Thanks in Advance.
Anytime something works on some machines or not on others, or suddenly stops
working on a given machine, the first thing to suspect is a problem with the
References collection.

Open any code module, then select Tools | References from the menu bar.
Examine all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

If that doesn't solve the problem, then you're going to have to find exactly
what line of code is causing the problem. It's possible, for example, that
there's something in the code that's using Late Binding to automate some
application, and her machine doesn't have the same version of the
application that's being automated as she used to.
Hi everyone, I am new to this site and new to access all together. My
problem is, there are probably about 10 people at my place of
employment that
[quoted text clipped - 8 lines]
can't believe it either), but we will be converting to 2003 in a few months.
Anyone's help is appreciated.
 
M

MFulton

Below is what the entire code looks like, let me know if you see anything out
of the ordinary that might cause this runtime error. Like I said earlier,
when the error pops up, I click debug, and it immediately takes me to this
code with a yellow arrow pointing at the "Calendar.Day = Day(Date)" section
of the sub form close to the bottom of this post. Thanks in advance.

Option Compare Database
Option Explicit
Dim field As Byte

Private Sub Calendar_Click()
Dim sel_date As Date
If field = 0 Then
sel_date = Calendar.Value
Start_Date.SetFocus
Start_Date = sel_date
End If
If field = 1 Then
sel_date = Calendar.Value
End_Date.SetFocus
End_Date = sel_date
End If
End Sub

Private Sub Command4_Click()
On Error GoTo Cmd04_err
DoCmd.OpenReport rt_report, acPreview
Start_Date.BackColor = 16777215
End_Date.BackColor = 16777215
Cmd04_end:
Single_Date = False
Exit Sub
Cmd04_err:
MsgBox Err.Description
End Sub

Private Sub End_Date_GotFocus()
field = 1
End_Date.BackColor = 16627125
Start_Date.BackColor = 16777215
End Sub

Private Sub Form_Unload(Cancel As Integer)
Single_Date = False
End Sub

Private Sub Start_Date_GotFocus()
field = 0
Start_Date.BackColor = 16627125
End_Date.BackColor = 16777215
End Sub

Private Sub Form_Load()
Calendar.Day = Day(Date)
Calendar.Month = Month(Date)
Calendar.Year = Year(Date)
field = 0
If Single_Date = True Then
End_Date.Enabled = False
End If
End Sub

What's Calendar? I assume it's a calendar control, but which one?

I'd assume there's some difference with the Calendar control on her machine.

To completely avoid such problems with Calendars, consider using the all-API
one Stephen Lebans has at http://www.lebans.com/monthcalendar.htm
Thanks for responding Douglas, I had already tried that method, but it still
doesn't work. When it gives me the Runtime 438 error and I click Debug, is
[quoted text clipped - 48 lines]
 
D

Douglas J Steele

You appear to have misunderstood me. I'm assuming that Calendar is an
ActiveX control on your form. Are you sure that the user who is experiencing
the problems has the same version of that control on her machine as on all
the other machines?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


MFulton said:
Below is what the entire code looks like, let me know if you see anything out
of the ordinary that might cause this runtime error. Like I said earlier,
when the error pops up, I click debug, and it immediately takes me to this
code with a yellow arrow pointing at the "Calendar.Day = Day(Date)" section
of the sub form close to the bottom of this post. Thanks in advance.

Option Compare Database
Option Explicit
Dim field As Byte

Private Sub Calendar_Click()
Dim sel_date As Date
If field = 0 Then
sel_date = Calendar.Value
Start_Date.SetFocus
Start_Date = sel_date
End If
If field = 1 Then
sel_date = Calendar.Value
End_Date.SetFocus
End_Date = sel_date
End If
End Sub

Private Sub Command4_Click()
On Error GoTo Cmd04_err
DoCmd.OpenReport rt_report, acPreview
Start_Date.BackColor = 16777215
End_Date.BackColor = 16777215
Cmd04_end:
Single_Date = False
Exit Sub
Cmd04_err:
MsgBox Err.Description
End Sub

Private Sub End_Date_GotFocus()
field = 1
End_Date.BackColor = 16627125
Start_Date.BackColor = 16777215
End Sub

Private Sub Form_Unload(Cancel As Integer)
Single_Date = False
End Sub

Private Sub Start_Date_GotFocus()
field = 0
Start_Date.BackColor = 16627125
End_Date.BackColor = 16777215
End Sub

Private Sub Form_Load()
Calendar.Day = Day(Date)
Calendar.Month = Month(Date)
Calendar.Year = Year(Date)
field = 0
If Single_Date = True Then
End_Date.Enabled = False
End If
End Sub

What's Calendar? I assume it's a calendar control, but which one?

I'd assume there's some difference with the Calendar control on her machine.

To completely avoid such problems with Calendars, consider using the all-API
one Stephen Lebans has at http://www.lebans.com/monthcalendar.htm
Thanks for responding Douglas, I had already tried that method, but it still
doesn't work. When it gives me the Runtime 438 error and I click
Debug, is
[quoted text clipped - 48 lines]
can't believe it either), but we will be converting to 2003 in a few months.
Anyone's help is appreciated.
 
M

MFulton via AccessMonster.com

Thanks Douglas,

It was a control that was the problem, it was suppost be installed with
access, but for some reason it wasn't. It was the mscal.ocx control that was
causing the problems. Your help was appreciated! Thanks Again.
You appear to have misunderstood me. I'm assuming that Calendar is an
ActiveX control on your form. Are you sure that the user who is experiencing
the problems has the same version of that control on her machine as on all
the other machines?
Below is what the entire code looks like, let me know if you see anything out
of the ordinary that might cause this runtime error. Like I said earlier,
[quoted text clipped - 70 lines]
 
D

Douglas J Steele

I would have expected it to show up as a missing reference. Glad you got it
fixed.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


MFulton via AccessMonster.com said:
Thanks Douglas,

It was a control that was the problem, it was suppost be installed with
access, but for some reason it wasn't. It was the mscal.ocx control that was
causing the problems. Your help was appreciated! Thanks Again.
You appear to have misunderstood me. I'm assuming that Calendar is an
ActiveX control on your form. Are you sure that the user who is experiencing
the problems has the same version of that control on her machine as on all
the other machines?
Below is what the entire code looks like, let me know if you see anything out
of the ordinary that might cause this runtime error. Like I said
earlier,
[quoted text clipped - 70 lines]
can't believe it either), but we will be converting to 2003 in a few months.
Anyone's help is appreciated.
 

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