Search results

  1. A

    Cross tab query

    I want to be to show duplicates in a cross tab query. For example some customers have ordered the same product but on different dates. If i run a cross tab I can only show the first or last date. I want both dates. Can someone help?
  2. A

    Pattern matches across 2 table columns

    I am trying to find company matches between 2 tables. The issue I have is that the spellings on table A differs from table B. Some of the differences are minimal like "St. Annes" and "St Annes". And some really big "St. Annes" and "Annes, ST London" Has anyone ever attempted to tackle such...
  3. A

    Run queries that are named in a table.

    Basically I want to execute every query within my database that exists in one of my tables. It should fill a recordset with the query names and loop through the database and execute each one. When I try and run access keeps saying run-time error 3061 too few parameters (yellow line). I know...
  4. A

    Putting an aggregate inside a where clause

    I need to change the below to a where clause to fit inside a union query that is just where clauses, can someone offer some advice? tblNEWNONTODATA.DateOfVisit) AS FirstOfDateOfVisit FROM tblNEWNONTODATA GROUP BY tblNEWNONTODATA.EVX, tblNEWNONTODATA.TCGDecision HAVING...
  5. A

    Match Postcodes ad return part that matches

    I have been given a list of UK postcodes, with the following format L15TG or TS14TGU. I need to be able to match these postcodes to a list of postcodes I have stored in the database, however, my list are only UK outcodes, so L15TG is just L1 and TS14TGU is just TS14. So I need to match the...
  6. A

    Linking Data on 2 fields.

    I have a table of data with customer id, visit ref, reason for visit, type of visit and other stuff. I then have various support queries that group customers based on reason for visit, type of visit etc. I need to be able to link this to my main table so that each customer has a category...
  7. A

    #Error appearing in calculated field

    I have created the following field to work out decimal age from a date of birth. DECIMAL AGE: Round(((Now()-[tbl_Suspects]![DateOfBirth])/365.25),2) It has always worked, however,access is now returning #Error for each person, I suspect because Suspects with no DoB have started to appear. Can...
  8. A

    Unique Customers with Duplicate Order Numbers

    The below code works fine in SQL server to identify customers with duplicate order numbers, however, I want to use it in access, but realised count(distinct) is not available there. Can someone help amend? SELECT o.* FROM (SELECT OrdNum, COUNT(DISTINCT CustId) FROM OUTPUT GROUP...
  9. A

    Max Min Queries

    I am trying to compare max and min customer visit dates to determine whether a re-visit has occurred; so, if the max visit date is > than the min then a re-visit has occurred etc. I could do this by writing a query to determine the max date for each customer, another to determine the min date...
  10. A

    Creating Properties

    I am trying to create a property through the following code Public Sub refresh() Dim prp As DAO.Property Set prp = CurrentDb.CreateProperty("LastRefreshedDate", dbDate, Date) End Sub I have created the following to store the LastRefreshedDate and then present this on a user form via a...
  11. A

    Refreshing Excel Pivots from Access using VBA

    I have created the following code to export a Recordset into 2 seperate excel files, which works fine. However, I am now trying to also refresh the pivot tables during this proicess, which wont work. I have commented out the section I wrote to do this. Can someone assist? [CODE] Private Sub...
  12. A

    Exporting Data to Excel Template But Saves Under a Different Name

    I am able to use DoCmd.TransferSpreadsheet to export data from Access to Excel, however, I want to be able transfer data into a specific sheet within an Excel template (e.g. Tasking.xls), that will then save under a different name (e.g. Tasking 20140429.xls). The other sheets within the Excel...
  13. A

    Make Table Query - Find Table Name

    How can you determine the name of a table that has/is going to be created by a make-table?
  14. A

    Make Table Conversion Error

    I am trying to run a make table query and a type conversion error comes up. I have checked the datatype fields from the original table and the one thats being created and they match. Has anyone experienced this before and how can I address it? Thanks
  15. A

    Compare Column Names & Sequence

    I want to be able to compare two tables to see whether their Column Names & sequence are the same. Has anyone ever done this before?
  16. A

    Export to Excel, then Outlook

    I know how to export from acccess to excel using vba, but what I would like to do, is export my data to excel, which then creates an email in outlook ready to be sent out. Is this possible?
  17. A

    Comma Seperate Access to Word

    How can I export a column of IDs from a table in Access into Word, and then seperate each ID by a comma? This data will then be plugged into Business Objects. E.g. 123 1523 296 Into: 123,1523,296 In addition to this, if there are more than 1000 IDs, then they would be split into blocks...
  18. A

    Select Distinct & Where

    I have created the following query: SELECT 'A Review' AS [Work Stream], Current_Wk.Person_Count, Previous_Wk.Person_Count, IIf([Current_Wk].[Person_Count]=[Previous_Wk].[Person_Count], "No Change", IIF([Previous_Wk].[Person_Count]>[Current_Wk].[Person_Count], "-" &...
  19. A

    Show +/- is calculation

    I have a basic SQL query that calculates the difference between numbers in two different tables. By default, the - sign shows if the numbers have dropped, however, how do I get increase to be prefixed with a + sign?
  20. A

    query issue

    I have created the following statement to count unique records from a table in my database : SELECT "A Review" AS [Work Stream], COUNT(1) AS PERSON_COUNT FROM (SELECT DISTINCT tblAReview.[Person ID] FROM [tblAReview] ) I then repeat the statement...
Back
Top Bottom