Recent content by KirRoyale

  1. K

    Problem creating a form from multiple tables

    Thank you all for your help and comments. I have tried the 2 methods as follows: Creating form from query I created a query with the ‘Contacts’ table as well as the joined ‘Company’ and ‘Country’ tables. Then I created a form from the query. The form input updates the query and the company...
  2. K

    Problem creating a form from multiple tables

    In addition, if I select a value for the ‘Company’ field for e.g. record 2, it overwrites the entries for records already input.
  3. K

    Problem creating a form from multiple tables

    I am trying to create an input form for input to tables. There is a main ‘TblContacts’ table with fields such as: ‘LastName’, ‘FirstName’, ‘Address’, etc. There are also ID fields for the Company and Country and joins to the ‘Company’ and ‘Country’ tables, each with just ID and name fields. I...
  4. K

    Poor query performance

    After a lot of trial and error, I was able to create a new table of just the ‘calloutnum’ records and join that to the main table (joining the ‘callto’ field on the main table with the ‘callout’ field on the newly created table) and adding the extra fields e.g.: CallType...
  5. K

    Poor query performance

    Thank you for the post. For each of my 120,000+ rows I want to identify whether the number called (callToNum) is also one of the company mobiles (callOutNum). For calls to ‘external’ numbers (those to numbers other than company mobiles – or branch offices, which is part 2 of the problem -...
  6. K

    Poor query performance

    Apologies for the confusion and thank you for the posts. A reworked version of the VBA with English field names: Private Sub cmdOK_Click() ' Pointer to error handler On Error GoTo cmdOK_Click_err ' Declare variables Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim strCategory As...
  7. K

    Poor query performance

    Thank you. I have worked through your example. It works and I understand it. In my particular case, the company mobile (number doing the calling) and the number called are 2 fields in the same table. Even if I create a new table with 1 field – the distinct values from the ‘Number called’ and...
  8. K

    Poor query performance

    Thank you for the reply. I understand that Dcount is causing a problem. Could you please expand on what you mean by “you need to look into creating JOINS by adding the count values to another built in Query”. I was thinking perhaps of creating another table of all the numbers called by a SELECT...
  9. K

    Poor query performance

    I have a selection of queries that are being run through a form after selection of 3 fields in combo boxes. One Totals query is extremely slow, taking several minutes for the selections in the combo boxes to become visible – especially for one of the combo boxes. The code is as follows...
  10. K

    Error message 3122. Problem using ‘sum’ on amount field in totals query

    Thank you. If I change it to: Sum(Call1CumulativeFULL.料金) AS 料金OfSum It works fine!
  11. K

    Error message 3122. Problem using ‘sum’ on amount field in totals query

    I have a piece of code where I am selecting values for 3 of the fields through combo boxes to run a query. This works fine on a detailed query but I have problems when I try and amend the code to run a totals query. When I run the following query directly, there is no problem: SELECT...
  12. K

    Executing a query through a form

    Thank you, found it. It was in a separate module. I’m still a bit fixated on class modules!
  13. K

    Executing a query through a form

    I am trying to persevere with this and have now found and tweaked the following code: Private Sub cmdOK_Click() ' Pointer to error handler On Error GoTo cmdOK_Click_err ' Declare variables Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim strSource As String Dim strDepartment As...
  14. K

    Robust form input from joined tables

    Fantastic! Just what I was looking for!
  15. K

    Robust form input from joined tables

    Excellent! thank you. Do you know how to sort the ‘names’ alphabetically? I think the sort order of the ID numbers is showing.
Top Bottom