New Install - problems with existing modules etc

  • Thread starter Thread starter Anne
  • Start date Start date
A

Anne

My database has a problem since I installed office 2003 on a new laptop, but
everything is fine on my old laptop. Both are running Windows XP, Office 2003
SP3, libraries are the same in both. I now have on both computers the same
back end and front end. I can't figure out why some items don't work on the
new computer and I am trying to narrow it down to specific.
Even for the close button comes up with an error message: The expression On
Click you entered as the event property setting produced the following error:
Label not defined.
Private Sub Cancel7_Click()
DoCmd.Close acForm, Me.name
End Sub
What am I looking for?
 
The strange thing is, that this form works on my old laptop, therefore there
should not be a problem. It stops at any label on this particular form, like
a combobox. I am using Stephen Lesban's calendar module on this form and the
 
Private Sub Form_Load()
' This must appear here!
' Create an instance of our Class
Set mc = New clsMonthCal
' ** YOU MUST SET THE hWndForm Property!
mc.hWndForm = Me.hWnd
End Sub


Private Sub Form_Unload(Cancel As Integer)
' This is required in case user Closes Form with the
' Calendar still open. It also handles when the
' user closes the application with the Calendar still open.

If Not mc Is Nothing Then
If mc.IsCalendar Then
Cancel = True
Exit Sub
End If


Set mc = Nothing
End If
End Sub

It actually never opens the form, anything I click on, it comes up as label
not defined. If I run compile it stops at another form at the following code
Sub cboMoveTo_AfterUpdate()
Dim rs As DAO.Recordset

If Not IsNull(Me.cbomoveto) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[JobID] = " & Me.cbomoveto
If rs.NoMatch Then
MsgBox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub

Highligted is me.cbomoveto actually only the cbomoveto and not me.
I use this cbomoveto and the calendar routine on many forms, this is the
only one with a problem.
 
I have tried all suggestions without success. This form is almost identical
to another form which works. I copied an pasted the main items from the
working form to the non working form. I deleted all other items on the non
working form and still the errors. I think I will create a new form from
scratch.
It just does not leave me with much confidence, that I won't run into the
same problems sometime later.
 
I am using Allen Browne's suggestion of re-registering the libraries and I am
getting an error:
C:\program files\common files\system\ado\msado21.tlb was loaded, but the
DllRegisterServer entry point was not found. C:\program files\common
files\system\ado\msado21.tlb does not appear to be a .dll or .ocx
What does that mean?
 
Apparently it is not important.
On my old laptop, I thought I would try and recompile, and it also stopped
at the first Me.combobox with member or datafile not found. I searched this
newsgroup for the error and found several suggestions of replacing the period
with an exclamation mark. I did a search for Me. and replaced it with Me!
The compile ran flawless. I transferred the file to new computer and now the
program works there as well.
 
I have this terrible feeling, that this is going to come back to haunt me
sometime in the future. Things seem fine right now, but I am going to work on
rebuilding this database using Allen Browne's guidelines for corrupted
databases.
Thanks,
 
Back
Top