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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. clapper62

    Dynamically Relink tables on open DB

    This is not my code I wish I could remember who to give credit to but I found it several months back Private Function createAttached(strTable As String, strPath As String, strBaseTable As String) As Boolean '************************************************************************************ '*...
  2. clapper62

    decibel calculation

    Hello All I have this code Private Sub cmdCalcPowerDbGainLoss_Click() Dim PowerGainRatio As Double PowerGainRatio = Me.tboxOutputPower / Me.tboxInputPower Me.tboxDbGainLoss = Log(PowerGainRatio) * 0.43429 Me.tboxDbGainLoss = Me.tboxDbGainLoss * 10...
  3. clapper62

    set access form recordset to ADO recordset

    It appears my thread is dying so I am starting to believe what I want to do isn't possible anyway just a little more experimenting produced this Database Type Microsoft Access (mdb) Absolute Page -1 Absolute Position -1 BOF False CacheSize 1 CursorLocation...
  4. clapper62

    set access form recordset to ADO recordset

    in an attempt to follow through on lameid suggestion I used the following code Dim i As Integer With rst For i = 0 To (.Properties.Count - 1) Debug.Print i & " " & .Properties(i).Name & ", " & Properties(i) Next i End With which produced the following...
  5. clapper62

    set access form recordset to ADO recordset

    Thanks for the info MajP after looking through the links you provided I still don't have a solution when I created a recordset with a SELECT statement from a table in the database I was able to bind that recordset to the form but I still can't bind an OpenSchema(adSchemaTables) recordset. I...
  6. clapper62

    set access form recordset to ADO recordset

    I have to think that there must be a difference between a ADO recordset retrieved from a SQL Server database and one retrieved from an Access database but I have no explanation as to why this would be. The only difference in the code is the connection string. In the interest of being thorough...
  7. clapper62

    set access form recordset to ADO recordset

    thank you for the reply Ok I tried Forms!frmData.Recordset = rst and I got Runtime error 91 object variable or with block variable not set I feel I should say again that Set Forms!frmData.Recordset = rst works if I connect to a MS SQL Server
  8. clapper62

    set access form recordset to ADO recordset

    I'm trying to set an Access Forms recordset to an ADO recordset containing a list of tables in an Access .mdb database with the following code Set rst = objConnection.OpenSchema(adSchemaTables) rst.MoveLast rst.MoveFirst Debug.Print rst!TABLE_NAME Set...
  9. clapper62

    create a recordset object from a forms recordset

    I tried several different cursorlocations while creating the recordset with no success and I have spent more time on this than I wanted to so I think I will just create a new connection to the server and create recordsets with SQL sorted the way I want it displayed I'm sure you are facing me in...
  10. clapper62

    create a recordset object from a forms recordset

    here's my newly attempted code Private Sub cmdSort_Click() Dim RS2 As adodb.Recordset Set RS2 = Me.Recordset RS2.CursorLocation = adUseClient RS2.Sort = "" Set Me.Recordset = RS2 End Sub and that gives me an error at Set Me.Recordset = RS2 Run-time error Method...
  11. clapper62

    create a recordset object from a forms recordset

    I tried several different fields with same results I also tried RS2.Sort = "" which I read should reset the order to it's original state but I still get the same error
  12. clapper62

    create a recordset object from a forms recordset

    Thank you borh for your time spent MajP your code Private Sub EmployeeID_Click() Dim RS2 As adodb.Recordset Set RS2 = Me.Recordset RS2.Sort = "FirstName" Set Me.Recordset = RS2 End Sub is actually what I'm interested in. you say it works for you unfortunately it doesn't for me I am using...
  13. clapper62

    create a recordset object from a forms recordset

    Just to be thorough I have no problem with this code here is the code that populates the data in the form Dim strConnectionString As String Dim objConnection As adodb.Connection Dim rst As New adodb.Recordset Dim strSQL As String 'create the connection to the server...
  14. clapper62

    create a recordset object from a forms recordset

    PHV ok this code Dim rst As DAO.Recordset Set rst = Me.Recordset Debug.Print rst.RecordCount give error Type mismatch at Set rst = Me.Recordset MajP I think what your saying is the reverse of what I'm trying to do, assign a forms recordset to a recordset object if not then please just a...
  15. clapper62

    create a recordset object from a forms recordset

    PHV >By default, a Form's recordset is ADO, not ADO. I can only assume you mean a forms recordset is DAO, not ADO >So, again, how you assign the forms recordset to an ado recordset ? I don't know how to assign a forms recordset to an ADO recordset, I don't even know if it can be done that is...
  16. clapper62

    create a recordset object from a forms recordset

    MajP I thought that Set rst = Me.Recordset was the assignment remember the original question was if it is even possible to assign a forms recordset to a recordset object and then perform operations on that recordset object I know that I can do what i want to do by opening a connection to the...
  17. clapper62

    create a recordset object from a forms recordset

    The Set rst = Nothing was after some other code like this Dim rst As New adodb.Recordset Set rst = Me.Recordset rst.Sort = "User_Id ASC" Debug.Print rst.RecordCount Set Me.Recordset = rst Set rst = Nothing this code gives an error at Debug.Print rst.RecordCount runtime error 3704 operation...
  18. clapper62

    create a recordset object from a forms recordset

    I have a form with data I populated with a ADO recordset from SQL server what I would like to do now is create a recordset object from the data in the form something like this Dim rst As New adodb.Recordset Set rst = Me.Recordset Set rst = Nothing this code runs without error but I dont think...
  19. clapper62

    Bind ado recordset to access form

    oops figured it out I took the Me.Requery out and it works fine now
  20. clapper62

    Bind ado recordset to access form

    I'm trying to list the tables from a sql server database in an access form I have a continuos form wih one field Named TABLE_NAME and it's recordsource set to TABLE_NAME with the following code Private Sub Form_Open(Cancel As Integer) Dim objConnection As ADODB.Connection Dim rst As New...

Part and Inventory Search

Back
Top