Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2002
    Posts
    5

    Question Unanswered: Helllllllllllllpppppppppppppppppppppppppppppppp

    I trying to acces by a recordset on my table and that doesn't function. it say to me
    run-time error '3001':

    invalid argument.

    my source code is


    Dim rstTMP1 As New Recordset 'table TransfertInscTMP1
    Dim NewEmail As String
    Dim NewWorkPhone As String
    Dim NewFaxNumber As String

    Set rstTMP1 = CurrentDb.OpenRecordset("TransfertInscTMP1", dbOpenDynaset) 'the place that doesn't run

    thanks for your help

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    I don't see any error in the line giving the error but:

    Dim rstTMP1 As New Recordset

    should be

    Dim rstTMP1 As Recordset

    OpenRecordset does in fact create a new recordset object so you won't need to create your own (just set the reference). I don't know if that changes anything for that error message as it doesn't really seem to be related to the set statement rather the openrecordset call....

  3. #3
    Join Date
    Jun 2002
    Posts
    5

    Red face doesn't work

    doesn't function I try this but the same error comming. It's always the same eror. and the error show me this line
    -----------------------------------------------------------------------------------

    Set rstTMP1 = CurrentDb.OpenRecordset("TransfertInscTMP1", dbOpenDynaset)

    -----------------------------------------------------------------------------------
    TransfertInscTMP1 = table in my bd access
    were is the invalid argument that possible is because I don't declare my microsoft jet ?

  4. #4
    Join Date
    Jun 2002
    Posts
    5

    Lightbulb one value is empty????

    the value dbOpenDynaset in Set rstTMP1 = CurrentDb.OpenRecordset("TransfertInscTMP1", dbOpenDynaset) is empty that is suppose to be normal?????

  5. #5
    Join Date
    Oct 2001
    Location
    Bay Area, CA
    Posts
    117
    try

    Set rstTMP1 = CurrentDb.OpenRecordset("SELECT * FROM TransfertInscTMP1")

    Hope this helps

  6. #6
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    No, dbOpenDynaset constant has the value 2.

    Set option explicit in your module and see if it compiles. If not you probably have some missing/broken references.

  7. #7
    Join Date
    Jun 2002
    Posts
    5

    Talking Problem resolve

    yester day I resolve my problem

    I change


    Dim rstTMP1 As New Recordset 'table TransfertInscTMP1
    Dim NewEmail As String
    Dim NewWorkPhone As String
    Dim NewFaxNumber As String

    Set rstTMP1 = CurrentDb.OpenRecordset("TransfertInscTMP1", dbOpenDynaset)

    by

    Dim cnn As New ADODB.Connection
    Dim rstTMP1 As New ADODB.Recordset 'table TransfertInscTMP1
    Dim NewEmail As String
    Dim NewWorkPhone As String
    Dim NewFaxNumber As String
    With cnn
    .Provider = "microsoft.jet.oledb.4.0"
    .ConnectionString = CurrentProject.Path & "\uspc4-2000-1.mdb"
    .Open
    End With
    With rstTMP1
    Set .ActiveConnection = cnn
    .CursorType = adOpenKeyset
    .LockType = adLockOptimistic
    .Source = "select * from TransfertInscTMP1"
    .Open
    End With


    and all work


    Tanks for your help



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •