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

Recent content by BMarkham

  1. BMarkham

    Create Table in correct SQL database

    Thanks for the reply Mark, but after much wasted time and hair pulling, I realized I had a typo in the connection string. Actually, if you look above, I spelled "Initial Catalog" with an extra 't' after the 'n'. Duhhhh! Brett
  2. BMarkham

    Create Table in correct SQL database

    I'm using ADO from VBA to send a CreateTable statment to a SQL server. My connection string looks like this: "Provider=SQLOLEDB;Server=ServerName;Intitial Catalog=DatabaseName;Integrated Security=SSPI" I create a command object that uses the above connection string. I set the command...
  3. BMarkham

    removing filter when opening form

    Turn the filter off in the form's Load event. Private Sub Form_Open(Cancel As Integer) Me.Filter = "" Me.FilterOn = False End Sub Brett
  4. BMarkham

    Limit character typed into textbox - SQL backend

    I think I'm out of luck, but I'll ask anyways. When the record source of a form is an Access table, a textbox will automatically limit the maximum number of characters that can be typed into to the field size of the text field it's bound to. I'm using Access 2k and SQL server 2k. The record...
  5. BMarkham

    Access frontend can't save record to SQL server

    Thanks for the help. The problem was with my SQL text fields. They were being mapped to Access as 255 character text fields (instead of memo fields.) The simplest solution was actually decided for me. We're upgrading to office 2000. Access 2000 maps all the SQL fields to appropriate Access...
  6. BMarkham

    ADO Connection to the Current Access 97 Database

    Well, ADO isn't part of Access97 per se. It's a component installed on your computer that you can use in your Access 97 databases by setting a reference to it. Much the same way you could set a reference to Microsoft Excel and create spreadsheets from your Access databases (if you really wanted...
  7. BMarkham

    Access frontend can't save record to SQL server

    Sorry. Access 97 attaching to SQL 2000.
  8. BMarkham

    ADO Connection to the Current Access 97 Database

    P.S. After you've set a refernce to ADO, you have to be very specific when declaring variables. Eg: Dim myRS as ADODB.Recordset Set myRS = New ADODB.Recordset Since both ADO and DAO have recordset objects you need to include the ADODB or DAO prefix when declaring them. There are other shared...
  9. BMarkham

    ADO Connection to the Current Access 97 Database

    You can use ADO from Access 97. From any module window go to Tools menu, References... Scroll down through the list, find "Microsoft ActiveX Data Objects 2.6 Library", and put a check it. You may have several versions of ADO installed on your system (I have 2.0, 2.1, 2.6, 2.7). Just...
  10. BMarkham

    ADO Connection to the Current Access 97 Database

    Try this to open a connection to an Access 97 database: Dim conn As ADODB.Connection conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=C:\MyDatabase.mdb" conn.Open If it's an Access 2000 database, the Provider is Microsoft.Jet.OLEDB.4.0
  11. BMarkham

    Access frontend can't save record to SQL server

    I've got an Access front end database attaching to SQL server tables through a DSN connection. My table has 34 fields, 26 of which are nchar or nvarchar. Entering data from the table, I'm able to type in the first 17 fields without a problem. However, if I enter any information into fields 18 to...
  12. BMarkham

    Insert Record to Access via ADO

    Sorry. The way I wrote it was confusing. There is more code after the AddNew method is called, but it never gets a chance to run. An error occurs telling me the AddNew method can not be used on that recordset. Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim strSQL As String...
  13. BMarkham

    Insert Record to Access via ADO

    I am attempting to open an empty recordset from an Access 97 table. Then use the AddNew method of the recordset to add a new record. I'm getting a message saying the OLE DB provider doesn't support this operation or I've chosen the wrong CursorLock. Code sample: Dim cn As New ADODB.Connection...
  14. BMarkham

    Retrieve Network User Name

    Is there a function that would return the domain user name of the individual logged onto the computer? Or maybe some way to do it through the API? Thanks, Brett

Part and Inventory Search

Back
Top