Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Mismatch

Status
Not open for further replies.

vlree

IS-IT--Management
Jan 16, 2004
31
0
0
US
I have the following code and have researched and read the answers to this problem. I have an Access 2000.adp; I have set my reference to the DAO.reference.x; But it is still failing at the line. This is an upsized db. Please help.
Code:
 Set recClone = Me.RecordsetClone()


Code:
Private Sub Form_Current()
    Dim recClone As DAO.Recordset
    
    Set recClone = Me.RecordsetClone()
    
        'If we are in a New Record disable the <AddNewContact2> Button
        'and Enable the rest of the buttons.
    
    If Me.NewRecord = True Then
   
        SaveNewContact.Enabled = True
        AddNewContact2.Enabled = False
        cmdAddAttendee.Enabled = True
Exit Sub
 
In ADP's recordsets, also the form recordsets, are ADO, so no DAO code would probably work there...

In this routine, you aren't even using the recordset, but for routines where you need the form recordset, you'll need:

[tt]Dim recClone As adodb.Recordset[/tt]

Roy-Vidar
 
Thanks that DID work, guess I didnt get it right the first time. However, 2nd question, The form will open now, but I cannot add a new record? Why?
 
Don't know, but to "round up" some of the usual suspects, is the recordsource updateable (i e a view, sp, table containing a unique field (PK), for ADP/SQL-server I think usually only a one table view/sp, but I don't know for sure).

There's a seperate forum for ADP's where issues relating to ADP's probably are better addressed, forum958.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top