Search results

  1. K

    Executing a query through a form

    I am trying to make selection on and run a query from a form and have plagiarised the following code: Private Sub cmdOK_Click() Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim strSQL As String Set db = CurrentDb Set qdf = db.QueryDefs("qryNewJobLocator") strSQL = "SELECT JobDetailNew.* " &...
  2. K

    error message that “you tried to execute a query..."

    Ah, sorry Brian, I misunderstood. I have also now realised that the ‘where’ from the dropdown you mentioned is in the ‘total’ row of the query grid. After following your advice, this now works perfectly and I have fewer queries to clutter up the database. SELECT Call0InternalSplit.請求年月...
  3. K

    error message that “you tried to execute a query..."

    Brian, Thank you. Splitting the query into: 1. Filtering with WHERE 2. A totals query did the trick!
  4. K

    Searching for teaching material / books on advanced SQL for Access

    Apologies if this is the wrong forum ….After a few months of grappling with Access, working through books and getting help on this site (and other internet resources), I’m finding that solving query problems is my main issue. Could somebody please recommend a good ‘Advanced SQL for Access’ book...
  5. K

    error message that “you tried to execute a query..."

    Apologies. I didn’t realise that the full message would have been more helpful. The complete error message is: “You tried to execute a query that does not include the specified expression ‘Call0InternalSplit.CallType Like “Internal” or (Call0InternalSplit.PartNrCalled Like “1111” Or...
  6. K

    error message that “you tried to execute a query..."

    I have a query that shows all calls from corporate mobile phones and indicates whether the number called is also a company mobile or whether it is a number in one of the company offices. When I try to run a totals query based on this: SELECT Call0InternalSplit.Month, Call0InternalSplit.NrCalled...
  7. K

    Lookup question

    CJ_London That worked perfectly, thank you!
  8. K

    Lookup question

    I have a table which includes corporate mobile phone numbers and the phone numbers that they dialed in each call. I want to notate whether the number called is another company mobile i.e. contained in the field of company mobiles) or an external number but I don’t know how to do this. Cold...
  9. K

    Question re error handling code

    Or to also incorporate Nanscombe’s suggestion: If Mid(tbldef.Name, 17, 13) = "_ImportErrors" Then
  10. K

    Question re error handling code

    I also noticed that, if I run an import twice or 2 imports related to the same table – such as with detailed data and totals (e.g. if the total records are in a different format to the detail), the 2nd import errors table shows up as “….ImportErrors1”. This results in an error as the right most...
  11. K

    Question re error handling code

    Thank you all for your help and input! I’m learning a lot!
  12. K

    Question re error handling code

    Thank you, Galaxiom! That worked a treat and is really short and concise!
  13. K

    Question re error handling code

    I have a very simple piece of code which deletes the import error tables for 6 file imports. Private Sub DeleteImportErrorTables_Click() 'Delete the import error tables for those created due to header row. DoCmd.DeleteObject acTable, "Call0CurrentFile_ImportErrors" DoCmd.DeleteObject acTable...
  14. K

    How to join tables with no matching, unique fields

    Thank you for the post. Because the phone number (電話番号) field is not numeric and appears multiple times in the transaction files, Access just hung when I tried to create queries that joined on it. My idea was to have the ID field in every table, each ID number relating to a particular phone...
  15. K

    How to join tables with no matching, unique fields

    There are no '&' signs in the [電話番号(MSN)] field but there is a space. I was able to get the query to open in design view by renaming the [電話番号(MSN)] field ‘PhoneNumber’ on the ‘Call0CumulativeTbl’ table - and without changing the name in the ‘PhoneNumbers’ table! Also, I don’t appear to need the...
  16. K

    How to join tables with no matching, unique fields

    Thank you for pointing that out. I have just changed the data type from Autonumber to Number. By the way, although the query worked, I am not able to open it in Design view. I get the message: “Microsoft Access can’t represent the join expression….in design view” Would you have any idea why I...
  17. K

    How to join tables with no matching, unique fields

    Recyan, That works a treat. Thank you!
  18. K

    How to join tables with no matching, unique fields

    I am undertaking an analysis of corporate mobile phone data based on data from the phone provider. The base data consists of a number of monthly text files at transaction level for voice calls, data usage, billing/tariff information, international calls/transfers etc. I have set up VBA code to...
  19. K

    Pivot table export to Excel

    RX, Thank you for the reply. I’m sorry but I’m at a very low level and have a couple of basic questions: 1. I was planning to have a button on a form to start the code. How should I start the code that you supplied? I get errors if I try to link this code to a form. 2. I wanted to save as an...
Back
Top Bottom