Search results

  1. L

    Problem Setting Variable

    I have a spreadsheet, where I would like to set a variable equal to the number of rows in a range, because I would like to use that number in offset formulas. I defined the variable like this: Dim TotalRows As Long. Then I tried to set it as follows: Set TotalRows = Range(Selection...
  2. L

    Switchboard Error

    I checked and I don't have any missing references. The references that are listed are Visual Basic for Applications, Microsoft Access 14.0 Object Library, OLE Automation, Microsoft DAO 3.6 Object Library, and Microsoft ActiveX Data Objects 2.1 Library. I tried adding references for Microsoft...
  3. L

    Switchboard Error

    I am using Access 2010. I took the .Connection out of the code, and now when I try to open the Switchboard, I am getting another error message. This one states: Run-time error '3001': Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another." When I...
  4. L

    Switchboard Error

    I get the same error message when I click Debug > Compile. It highlights a line of code that looks like this: Set con = Application.CurrentProject.Connection. con is defined as an Object.
  5. L

    Switchboard Error

    I have inherited a database that contains a switchboard that was set up, I believe using a wizard. There is a table called Switchboard Items and there is a form called Switchboard. However, this is not working properly. I keep getting a message that states: "Compile error: Error in loading...
  6. L

    If Query Open Close and Re-Open

    Thank you very much for all the suggestions. I was able to get it working.
  7. L

    If Query Open Close and Re-Open

    Is there a way to run code to see if a query is open? Then if the query is open, program the database to close it and re-run it? I have a query that is based on a field on my form. It runs fine the first time. However, if the user leaves the query open and goes back to the form, makes a new...
  8. L

    Refresh Pivot Table

    Thank you for the suggestion. Unfortunately, the results are not tied to a form. It's just a query displayed as a pivot table. I tried adding the code TwelveMoHistory.Requery to the On Click event of my button, but I got an error message stating that an object was required.
  9. L

    Refresh Pivot Table

    I have a form, containing a button that when clicked, it runs a query and displays the results in Pivot Table view. The query is set to display only results for the manager name selected on the form. So, when someone opens this database, they first select their name from a drop down box and...
  10. L

    Determine if Trend is Up or Down

    What do I need to add to the query to determine the up or down trend? I have twelve numbers that I want to know if they are trending up or down.
  11. L

    Determine if Trend is Up or Down

    I have a query that displays the average call rate on various pieces of equipment over the last 12 months. I was wondering if there is a way to have Access look at this query and determine if the call rates are trending up or down over that time frame. Kind of like a trend line would do on a...
  12. L

    Two Part Primary Key with One Null Value

    Thank you everyone for the advice. The compound indexes work really well. I was also able to use the code CJ_London provided to give the users a warning when they were about to enter a duplicate record before they had the entire record loaded.
  13. L

    Calculating Three Different Rolling Averages in One Query

    Okay, I tried making a separate query to hold the dates I wanted to use to determine the three month period and the six month period. I then re-wrote my query like this: SELECT LIST_WITH_TNC.Device, LIST_WITH_TNC.Model, LIST_WITH_TNC.[Item Num], Round(IIf([LIST_WITH_TNC]![Month Start Date]...
  14. L

    Calculating Three Different Rolling Averages in One Query

    Is there a way to calculate three different rolling averages in one query? I just inherited a database where someone is using three queries to capture the same information only with different time frames. They were calculating a rolling three month average, six month average, and twelve month...
  15. L

    Two Part Primary Key with One Null Value

    I have just inherited a database that currently has no primary key set up. I wanted to add a two part primary key, but have run into a couple problems. The purpose of the database is to keep track of parts that have come back for repair. I wanted to set the key up to be a combination of the...
  16. L

    SQL Server Problem

    I changed my append query, so that it listed out all the fields instead of using the *, and I still get an error message. Now it tells me that it can't find my query: "ODBC--call failed. [Microsoft][SQL Server Native Clinet 10.3][SQL Server]Invalid object name 'ptqryEquipmentTableDB2'.(#208)"...
  17. L

    SQL Server Problem

    That worked great for the delete queries. Thank you very much for the advice. I'm having trouble getting it to work for the Append queries. When I try to run this query, I get a message that the ODBC connection failed because it didn't recognize the '*'. How do I need to re-write this query...
  18. L

    SQL Server Problem

    I have recently "upsized" my database to an SQL Server because it was reaching the 2 GB limit. I was hoping that the move would speed up the database and prevent it from crashing because of it's size. The "upsizing" went fine, and I was able to run my queries afterwards. However, when I try...
  19. L

    Parameter in Field Row

    Thank you for all your help. I figured out what my problem was. The combo box I was using for the Customer Name was not return the value I thought it was (it returned the Customer Number instead of the Name). I adjusted that and now everything works great.
  20. L

    View Saved Import

    They didn't do the import via VBA. They have a Saved Import and use macros to run it. All the macro says is to "RunSavedImport" and the name of the import, but nothing else.
Back
Top Bottom