Recent content by ashley25

  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.

    I have sorted this. The loop was being skipped over so I replaced Do While Not rst.BOF And rst.EOF with Do While Not rst.EOF.
  4. A

    Run queries that are named in a table.

    I've updated my code, but it would appear the table with queries is not being picked up. The code doesn't do anything when I run it.
  5. 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...
  6. 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...
  7. A

    Match Postcodes ad return part that matches

    i understand the like operator however i cant get it to work in the situation. i am not searching for a particular set of records just where one field resembles another
  8. A

    Match Postcodes ad return part that matches

    In a way yes. But the fields dont match in current format. So I wanted to convert my postcode list from L15TG to L1 so it will match my other table.
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. A

    Refreshing Excel Pivots from Access using VBA

    .refreshall is for a worksheet, and my problem is that I have pivots stored across various tabs. I tried to incoporate .refreshall within the following (which is commented out in the main code) With wbExcel.Worksheets("Dashboard", "Pivot Data") ' 'Refresh Pivots ' .Protect "barb"...
  15. A

    Creating Properties

    I was missing the append element when creating the property, all fixed now. CurrentDb.Properties.Append prp
Back
Top Bottom