Search results

  1. K

    Getting Max from SELECT Query

    Hi I currently have 2 queries.. Query 1 select statement getting count of field Query 2 getting max of Query 1 Instead of the queries I want to do this in vba with a recordset ' Select from first query sql = "SELECT tblOriginal.ROUTE, Count(tblOriginal.ROUTE) AS CountOfROUTE " & _...
  2. K

    Create a Join using LEFT string manipulation

    Hi I think I know the answer but want to check. I've been asked to create a query, without querying a query first, but it's the only way I know. I have two tables Table1 will have data in a column that is 9 characters long ULCABC123 ULCABC124 ULCABC125 PLTABC123 PLTABC124 Table2 will have...
  3. K

    DAO OpenDatabase accdb file - Not a valid password

    Hi I've change my db to a accdb file and in my Excel (xlsm) file I am trying to use the open database (DAO method) I've changed the reference to: Microsoft Office 15.0 Access database engine It was working fine until I added a password to the database Here is the code: Set db =...
  4. K

    Class Event for Multiple Controls

    Hi I've got this code (which I can't remember where from now, but I don't claim to have done it). Basically I have a class event that works for all controls on any userform. Its all working fine but I can't add an event to trap the click or mouse move of the userform itself. Basically so...
  5. K

    Retrieve field properties DAO recordset

    Hi Is it possible to retrieve the format of a field when looping through recordset. e.g you can get the field type by using But the type for decimal or percentage is the same. It is the format that is different I need to be able to see what is formatted as a percentage and what is...
  6. K

    Edit recordset querydef that has a calculated field

    Hi Is it possible to add/edit a record from a DAO querydef that has a calculated field in. Set qdf = db.QueryDefs("qryOutput_" & strDept) qdf.Parameters("Enter Date") = dDate Set rs = qdf.OpenRecordset() Using the rs.Edit or rs.AddNew worked fine until I put a calculated field in the...
  7. K

    DLookup - Not exact match

    Hi I'm having trouble with something that I though would be simple (and it probably is). I have a query that displays a persons years service I then want to look up their entitlemet based on the years service. The entitlement table is... 0 yrs - 30 days 3 yrs - 31 days 5 yrs - 32 days...
  8. K

    Left Joins on Multiple Fields

    All I have attached a small sample to explain what I am trying to do... Basically, I have a table with lots of Fields, Q1, Q2, Q3, Q4, Q5, Q6 and so on. There are various codes in those fields. All I want to do is then have a query with a count of each individual code. The only way I can...
  9. K

    Sumproduct in Access

    Hi all I have been searching for a solution to this but can't find anything. This thread is the closest I have found but I need advice on how to build the arrays, if that is the way to do it. http://www.access-programmers.co.uk/forums/showthread.php?t=188959&highlight=sumproduct Anyway...
  10. K

    stop sum counting the same record twice

    I'll try and explain this the best I can... Basically I want to stop access counting the same record multiple times I have two tables checks and errors. A check can have several error types check units errors rate reason ID1 10 2 20% overs ID1 10 1...
  11. K

    Date Formats in VBA

    Hi all I have been having a problem trying to enter a date in a table using vba. I have fixed it now, but can anyone shed any light as to why my two examples use the date format differently but both work??? I know that vba uses the american date format but surely, it should remain the same no...
  12. K

    Import/Export Text Files with Specification Names

    Hi all I think I have found a solution now but I want to still ask a couple of questions regarding this as I've spent hours on it. and want to understand a bit more. Sorry, its a bit lengthy... (My solution is right at the bottom) Basically, I want to import text files into an Access table...
Top Bottom