Search results

  1. T

    DoCmd.OutputTo parameters

    Hi June7, Here is my revised code: Private Sub btnQryExport_Click() Dim dbs As DAO.Database Dim qdf As DAO.QueryDef Dim rst As DAO.Recordset Set dbs = CurrentDb Set qdf = dbs.QueryDefs("qry_Financial_data") 'Set the value of the QuerDef's parameter qdf.Parameters("EventID").Value = "151"...
  2. T

    Run Sproc with parameter in VBA

    I have revised the code as you suggested but still get the same error message. Also DonorNum is a String in vba and on the SQL side the parameter is a nvarchar(10) so the same data type.
  3. T

    DoCmd.OutputTo parameters

    June7 Sorry but I was posting and put this code here by mistake.
  4. T

    Run Sproc with parameter in VBA

    I revised the code but continue to get the ODBC error on this line: qdf.Execute dbFailOnErrorHere is all the code: If ValidDonorID = 1 Then LResponse = MsgBox("Is this the Donor your looking for " + DonorName + "?", vbYesNo, "Continue") If LResponse = vbYes Then...
  5. T

    Run Sproc with parameter in VBA

    The sproc works fine I can run it in SSMS without issue, I'm now trying to run it from an Access form.
  6. T

    Run Sproc with parameter in VBA

    I just realized that I had but the wrong table name in the string. But now, I getting an ODBC error. 3146 ODBC call failed. qdef.Connect = cdb.TableDefs("dbo_CPM_Donors").Connect
  7. T

    Run Sproc with parameter in VBA

    qdef.Connect = cdb.TableDefs("dbo_Import_MRN").Connect
  8. T

    Run Sproc with parameter in VBA

    I have an Access textbox with an after Update event that run this code. Simply put it gets a ten digit string that is passed to an SQL sproc that creates a record and inserts it into a table. Here is the code: I get a runtime error message 3265: Item not found in this collect. Does anyone see...
  9. T

    DoCmd.OutputTo parameters

    Public Sub ExecQryWPara() Dim dbs As DAO.Database Dim qdf As DAO.QueryDef Dim rptName As String QryName = "qry_Financial_Data" Set dbs = CurrentDb Set qdf = dbs.QueryDefs("qry_Financial_Data") 'Set the value of the QueryDef's parameter qdf.Parameters("").Value...
  10. T

    DoCmd.OutputTo parameters

    Public Sub ExecQryWPara() Dim dbs As DAO.Database Dim qdf As DAO.QueryDef Dim rptName As String QryName = "qry_Financial_Data" Set dbs = CurrentDb Set qdf = dbs.QueryDefs("qry_Financial_Data") 'Set the value of the QueryDef's parameter qdf.Parameters("").Value...
  11. T

    DoCmd.OutputTo parameters

    Follow-up: This is the code that I added to the on Click event of my 'Export to Excel' button. DoCmd.OutputTo acOutputQuery, "qry_Financial_Data", acFormatXLSX, , TrueAs, I mentioned there are no parameter but I need them. I have attached a screen shot of the dialog box that collects the...
  12. T

    DoCmd.OutputTo parameters

    Hi Report Masters, I have an Access report with a long text/Memo field column that keeps getting cut off. After doing research I found out that reports that are exported using the Database Tools -> Export ->Excel get truncated since the only export to older versions of Excel. This is true and...
  13. T

    run time error 3146 odbc call failed

    I appreciate everyone's effort to id the issue but all of a sudden the same error message started to occur in the production version. I don't know why but the code is not at issue since I made a new Access DB and put the code into it and it worked just fine. Even through it did work fine I...
  14. T

    run time error 3146 odbc call failed

    Tried it again and there is a specific spot where it fails. At 'Execute dbFailOnError'
  15. T

    run time error 3146 odbc call failed

    Please note that is works in the productions environment but all of a sudden stopped working in the dev environment. The code is exactly the same. In fact, I copied the code from productions and pasted it into the dev environment and it still gives me the same error.
  16. T

    run time error 3146 odbc call failed

    No pw and the error msg is the generic Access error. There is no line indicator.
  17. T

    run time error 3146 odbc call failed

    Hi All, I have this run time error that is strange. I say this because the error is occurring in my development environment but not in my production environment and the code is exactly the same. As, I add new features, I move this copy into the production folder for users to use. In fact, I...
  18. T

    32 Bit Issue

    I have added this code but, am still getting a missing lib ref error msg. #If Win64 Then Private Declare PtrSafe Function apiGetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As LongLong) As LongLong #Else Private Declare PtrSafe Function...
  19. T

    32 Bit Issue

    Any help on what library is missing?
  20. T

    32 Bit Issue

    I don't know if MSCOMCTL.OCX is discontinued but it is part of the error msg.
Back
Top Bottom