Can't Open Database

  • Thread starter Thread starter JamesJ
  • Start date Start date
J

JamesJ

Just got a new computer. I had the builder save my existing hard drive which
has
Access2000 and my db app on it. I installed a full version of Access 2003 on
the
NEW hard drive and now I am unable to open my db. I converted the front and
back
end to 2002/2003 format.
At this time when I try to open it I get an error 13 Type mismatch at:
Set RecClone = Me.RecordsetClone()

The only way at this time I'm able to do anything at all with my db is to
bypass
the Autoexec macro.
Also the Recently used list in the Options General tab is disabled.

Any and all help will be appreciated.

Thanks,
James
 
One more thing. I'm also getting an error message at:

Private Sub Form_Open(Cancel As Integer)

Me.RecordSource = Forms!frmDataAccess.RecordSource

Dim rs As Recordset
If Not IsNull(Me.OpenArgs) Then
Set rs = Me.RecordsetClone
rs.FindFirst "[ReminderID]=" & Me.OpenArgs
If rs.NoMatch Then

Else
Me.Bookmark = rs.Bookmark

End If
End If

End Sub

I double click or hit enter to open a form to the current record on the
calling form.

Error Message:

Compile Error
Method or data member not found.

I went into the Object Browser but had no idea what to look for.

Thanks again,
James
 
From what you have stated, the line
Set RecClone=me.RecordsetClone()
Should be
Set RecClone=me.RecordSetClone
No parentheses.
No suggestions for the Recently Used File List dilemma.
 
I removed them now I get different error message:

Runtime error '91'
Object variable or With block variable not set.
here is the entire function from the OnCurrent of the form:

Dim RecClone As Recordset
Dim intCount As Integer
Dim intPosition As Integer

Set RecClone = Me.RecordsetClone

If IsNull(Me.ctlRecID) Then

Else

RecClone.MoveLast
intCount = RecClone.RecordCount
RecClone.Bookmark = Me.Bookmark
intPosition = RecClone.AbsolutePosition + 1
lblCount.Caption = "Record " & intPosition & " of " & intCount

End If

RecClone.Close
Set RecClone = Nothing
 
If the values in your ReminderID are numeric, be sure to
convert the OpenArgs to a number i.e CLng(me.OpenArgs)
Also, Access 2000 and above uses ADO as a default rather
than DAO like previous version did. You should refer to a
Recordset as an ADODB.Recordset
Try this code for the middle portion of your event:
.......
Dim rs as New ADODB.Recordset

Set rs=me.RecordSetClone

rs.Find "[ReminderID]=" & CLng(me.OpenArgs)

If Not rs.BOF and not rs.EOF Then
Me.Bookmark=rs.Bookmark
End if
........
-----Original Message-----
One more thing. I'm also getting an error message at:

Private Sub Form_Open(Cancel As Integer)

Me.RecordSource = Forms!frmDataAccess.RecordSource

Dim rs As Recordset
If Not IsNull(Me.OpenArgs) Then
Set rs = Me.RecordsetClone
rs.FindFirst "[ReminderID]=" & Me.OpenArgs
If rs.NoMatch Then

Else
Me.Bookmark = rs.Bookmark

End If
End If

End Sub

I double click or hit enter to open a form to the current record on the
calling form.

Error Message:

Compile Error
Method or data member not found.

I went into the Object Browser but had no idea what to look for.

Thanks again,
James

JamesJ said:
Just got a new computer. I had the builder save my
existing hard drive
which
has
Access2000 and my db app on it. I installed a full
version of Access 2003
on
the
NEW hard drive and now I am unable to open my db. I
converted the front
and
back
end to 2002/2003 format.
At this time when I try to open it I get an error 13 Type mismatch at:
Set RecClone = Me.RecordsetClone()

The only way at this time I'm able to do anything at all with my db is to
bypass
the Autoexec macro.
Also the Recently used list in the Options General tab is disabled.

Any and all help will be appreciated.

Thanks,
James

JamesJ said:
Just got a new computer. I had the builder save my
existing hard drive
which
has
Access2000 and my db app on it. I installed a full
version of Access 2003
on
the
NEW hard drive and now I am unable to open my db. I
converted the front
and
back
end to 2002/2003 format.
At this time when I try to open it I get an error 13 Type mismatch at:
Set RecClone = Me.RecordsetClone()

The only way at this time I'm able to do anything at all with my db is to
bypass
the Autoexec macro.
Also the Recently used list in the Options General tab is disabled.

Any and all help will be appreciated.

Thanks,
James


.
 
I pasted into the OnOpen of the form and I'm getting
Error '13' Type mismatch

SFAxess said:
If the values in your ReminderID are numeric, be sure to
convert the OpenArgs to a number i.e CLng(me.OpenArgs)
Also, Access 2000 and above uses ADO as a default rather
than DAO like previous version did. You should refer to a
Recordset as an ADODB.Recordset
Try this code for the middle portion of your event:
......
Dim rs as New ADODB.Recordset

Set rs=me.RecordSetClone

rs.Find "[ReminderID]=" & CLng(me.OpenArgs)

If Not rs.BOF and not rs.EOF Then
Me.Bookmark=rs.Bookmark
End if
.......
-----Original Message-----
One more thing. I'm also getting an error message at:

Private Sub Form_Open(Cancel As Integer)

Me.RecordSource = Forms!frmDataAccess.RecordSource

Dim rs As Recordset
If Not IsNull(Me.OpenArgs) Then
Set rs = Me.RecordsetClone
rs.FindFirst "[ReminderID]=" & Me.OpenArgs
If rs.NoMatch Then

Else
Me.Bookmark = rs.Bookmark

End If
End If

End Sub

I double click or hit enter to open a form to the current record on the
calling form.

Error Message:

Compile Error
Method or data member not found.

I went into the Object Browser but had no idea what to look for.

Thanks again,
James

JamesJ said:
Just got a new computer. I had the builder save my
existing hard drive
which
has
Access2000 and my db app on it. I installed a full
version of Access 2003
on
the
NEW hard drive and now I am unable to open my db. I
converted the front
and
back
end to 2002/2003 format.
At this time when I try to open it I get an error 13 Type mismatch at:
Set RecClone = Me.RecordsetClone()

The only way at this time I'm able to do anything at all with my db is to
bypass
the Autoexec macro.
Also the Recently used list in the Options General tab is disabled.

Any and all help will be appreciated.

Thanks,
James

JamesJ said:
Just got a new computer. I had the builder save my
existing hard drive
which
has
Access2000 and my db app on it. I installed a full
version of Access 2003
on
the
NEW hard drive and now I am unable to open my db. I
converted the front
and
back
end to 2002/2003 format.
At this time when I try to open it I get an error 13 Type mismatch at:
Set RecClone = Me.RecordsetClone()

The only way at this time I'm able to do anything at all with my db is to
bypass
the Autoexec macro.
Also the Recently used list in the Options General tab is disabled.

Any and all help will be appreciated.

Thanks,
James


.
 
First make sure that the form has a valid recordsource,
then try this:

Dim RecClone As New ADODB.Recordset
Dim intCount As Integer
Dim intPosition As Integer

Set RecClone = Me.RecordsetClone

If Not IsNull(Me.ctlRecID) and Not rst.EOF Then

RecClone.MoveLast
intCount = RecClone.RecordCount
RecClone.Bookmark = Me.Bookmark
intPosition = RecClone.AbsolutePosition + 1
lblCount.Caption = "Record " & intPosition & " of " &
intCount

End If

RecClone.Close
Set RecClone = Nothing
 
Just a thought, Create a new "Empty" database. Then do an
import from the original database (off the old hard drive,
before you converted). Then do your convert.

Just a shot in the dark, but it may help.
 
Try it without the RecClone variable and just use
me.RecordSetClone
i.e.

Dim intCount As Integer
Dim intPosition As Integer

If Not IsNull(Me.ctlRecID) and Not me.RecordSetClone.EOF
Then
me.RecordSetClone.MoveLast
intCount = me.RecordSetClone.RecordCount
me.RecordSetClone.Bookmark = Me.Bookmark
intPosition = me.RecordSetClone.AbsolutePosition + 1
lblCount.Caption = "Record " & intPosition & " of " &
intCount

End If
-----Original Message-----
Another Type mismatch at
Set RecClone = Me.RecordsetClone
Then 'Assuming
 
Back
Top