Search results

  1. T

    Running queries using a macro

    Hi, Can I use a macro to run multiple queries in sequence? I searched on this but did not see anything that indicated how to do this. Any pointers would be appreciated! Thanks, Mark
  2. T

    Macro to run queries

    Hi, Can I use a macro to run multiple queries in sequence? I searched on this but did not see anything that indicated how to do this. Any pointers would be appreciated! Thanks, Mark
  3. T

    ** Print a report **

    Hi, Is it possible to print a report using a standard access button and not a user generated one? I usually print by right clicking on the report window but am looking for a more obvious way for useability purposes... Let me know :confused: Thanks, Mark
  4. T

    FileDialog object

    Hi, I have inherited some code from an MDB but need to migrate it to and ADP format. Does anyone know the correct syntax for a File Dialog object in ADP. I am getting the following error for the code below "User defined type not defined" :confused: 'Declare a variable as a FileDialog...
  5. T

    Connecting to SQL Server 2005

    Hi, I am using VBA to connect my Access ADP file to SQL Server 2005 Enterprise Edition. Can anyone spot a glaring errors with the following code? Thanks, Mark 'Open the connection to the SQL Server DB Dim cn As ADODB.Connection Dim strServerName As String Dim strDbName As...
  6. T

    SQL Server 2005 Login

    Hi, I am putting a SQL Server Backend on an Access frontend. When I create a new Login in SQL Server 2005 Enterprise Edition, I assign it a username and password. However when I go to view the properties of the login I just created there is a problem. Instead of seeing the 4 character...
  7. T

    SQL Server 2005 Login

    Hi, I am putting a SQL Server Backend on an Access frontend. When I create a new Login in SQL Server 2005 Enterprise Edition, I assign it a username and password. However when I go to view the properties of the login I just created there is a problem. Instead of seeing the 4 character...
  8. T

    Autonumber

    Hi, I am using SQL SERVER 2005 and its Management Studio to manage my data. The tables in SQL have been linked in from Access but the Autonumbers have not persisted in SQL. The column type is listed as int. Within SQL how do I change the data type to the equivalent of Autonumber for my Primary...
  9. T

    Listbox .additem

    Hi, I am trying to add to a listbox from a recordset with the following code. However I am getting a runtime error: The setting for this property is too long Do Until rtable.EOF Me![lstRisks].AddItem Item:=rtable.Fields("RiskID").Value & ";" &...
  10. T

    Listbox .Requery

    Hi, I have an Access front end linking to a SQL Server backend via an ADP file. When I edit a record, I am having trouble refreshing the listbox that displays that same record. I am trying to use the .Requery method (see code below) Can anyone suggest a better way? Thanks Mark Private Sub...
  11. T

    Moving to objects

    Hi, I need to convert some old code to ADODB format and I am having trouble finding the correct methods to use with the ADODB Recordset objects :confused: Old Method -> New Method with ADODB connection objects 1 FindFirst() -> Find()? (I think this one will be ok) 2 NoMatch()...
  12. T

    Writing to SQL Server

    Hi Please see the attached image of my error message. I am trying to write a new ID to a table in SQL Server. The ID has been generated by my VBA and I can verify that it is not duplicating another existing ID Any ID why I might be getting this error? Thanks, Mark
  13. T

    Listbox .additem

    Hi, How do I populate 2 columns to the listbox with the AddItem function? This is what I have been doing. I know that it prob has something to do with the list item but I haven't been able to crack it. lstProjects.AddItem (rs.Fields("ProjectID")) lstProjects.AddItem...
  14. T

    Query

    Hi, I have a table called Strategic Programmes which has 2 columns "ProgNo" (unique ID) and "ProgName" I need to connect to SQL Server from Access using connection and recordset objects to find the next highest "ProgNo" What is the SQL query I need to execute to find the next highest ID...
  15. T

    Menu Bar

    Hi, I was trying to change the form that appeared on Load by going to Tools>Startup and changing the settings there. However now I have lost most my my menu bar i.e. Edit, View, Tools etc. I only have File, Window and Help. :eek: How do I retrieve the menu bar in its original state? Thanks...
Back
Top Bottom