Search results

  1. E

    How to get current month data in access query

    The use of an existing index obviously has a much more significant effect. One user once reported a factor of more than 2500 from his own measurements, @MarkK's figure is 53.6 in this example. But also: The format function creates a string from a date value. Calculations and type conversions...
  2. E

    too slow on getting calc done

    IIf(DCount("site";"QddallA";"site='site5' and status='in progress' and duedate<date() and isactive=false") +DCount("site";"QddallA";"site='site5' and status='new' and duedate<date() and isactive=false")=0; ""; DCount("site";"QddallA";"site='site5' and status='in progress' and...
  3. E

    Solved AddNew method with field from variable (array)

    The bang operator is not suitable at this point. ' using the recordset's field collection myR.Fields("label" & i) = data(i) ' using the passed array myR.Fields(label(i)) = data(i)
  4. E

    How to get current month data in access query

    Format([Callgivendate], "myy") The calculation on the table field inevitably prevents possible index use. Therefore, @Galaxiom's suggestion is preferable, I would just rather use functions like Year, Month, Day than DatePart. But that is less important. The second aspect is that the comparison...
  5. E

    Solved TOP

    How many records does your table have? Lots of mass makes four work. For 1 product: SELECT TOP 6 * FROM TabX WHERE ProductID = 57 ORDER BY SalesDate DESC The SalesDate field and the ProductID field should be indexed. For all products: SELECT T.* FROM TabX AS T WHERE...
  6. E

    Import csv to excel to access table

    The dilemma is that the CSV file extension is assigned to Excel as the default program for opening it (this is a questionable measure by Microsoft). The second problem is that people do not trust the existing structure in the CSV and want to view the contents first by opening it. Actually, a...
  7. E

    Solved Automated search for Database Corruption Assistance

    In addition: table definitions do not simply change at will, sometimes PK, sometimes not, values duplicate themselves or disappear. This is nonsense. This can only be understood as corruption in the tables, and a third party is involved. Are we talking about the backend being an Access file and...
  8. E

    Who keeps Access opened 2 ?

    Creating a laccdb is a method of making an access file backend-capable. So when a backend is accessed (linking), the laccdeb is created in the same directory or supplemented with the relevant information. So if the backend is accessible and readable, the laccdb (simple text file) should be too...
  9. E

    Import csv to excel to access table

    This is cumbersome. A CSV is a text file, and a text file can be imported more easily, quickly and without problems than an Excel table. Using an import specification gives you a lot of control. If, for example, the text file contains 12 leading lines that do not belong to the actual table, you...
  10. E

    DateAdd

    DateSerial is wonderfully variable. ? #2024-07-30#, DateSerial(2024, 7 + 35, 30 - 1), DateSerial(2024 + 3, 7 - 1, 30 - 1) 30.07.2024 29.06.2027 29.06.2027
  11. E

    Removing Duplication in Complicated Report

    I can't open your database, I use Acc2010. So just the pictures: A table representation as you requested is not the usual, there are no standard means for this, if you really want to solve it exactly like that, it will be incredibly complex. Maybe you can then create your report output using...
  12. E

    Balance report

    SELECT R.TotalRevenue, E.TotalExpenditure, R.TotalRevenue - E.TotalExpenditure AS Balance FROM ( SELECT SUM(Revenue_Value) AS TotalRevenue FROM RevenueTable ) AS R, ( SELECT SUM(Expenditure_Value) AS TotalExpenditure FROM...
  13. E

    IIf expression Access

    amount *1 versus "Amount Not Found" In one case, the result is a number with decimal places (double), the other is visible text. The result is text as the data type for the calculated field. It may be sufficient to look at, but if you want to do further mathematical calculations with it or...
  14. E

    IIf expression Access

    In keeping with the database, it would be best to resolve these if-then orgies by creating an additional table for dyty_types with a factor included and linking it to the data table in a query. This design is then simpler, clearer, easier to maintain and expandable.
  15. E

    Record not found

    Whenever you filter, you can expect that the filtering will be thorough and will not produce any results, meaning you will get an empty recordset. Therefore, you have to check as a precaution. If Not rs.EOF if rs("fname") = "cccc" then....else.... End If...
  16. E

    Reading a long text file to insert rows in a table

    sSQL = "INSERT INTO co_comprobantes (lo_asiento_id, en_numero_registro, tx_cuenta, fe_fecha," & _ " tx_concepto, tx_operacion, mo_debe, mo_haber)" & _ " SELECT F1, F2, F3, Format(F4, '00/00/0000'), F5, F6," & _ " IIF(F6='D', F7/100, 0) AS monDebe, IIF(F6='D', 0, F7/100)...
  17. E

    Find and replace

    Isolating the values is a task for regular expressions.
  18. E

    Count IIf Function in Report

    A query returns a recordset (an object with rows and columns, even with one row and one column this is something other than a single value), but a control only accepts a single value. The simplest solution here would be to use a domain aggregate function, where the query is packed into a...
  19. E

    Count IIf Function in Report

    Correct. But my suggestion was also to use this query as a record source for a subreport. For the report with exactly one record, you can place the assigned controls anywhere you want and garnish them with some text. You actually love bound forms and reports, and I don't like constant DLookup fire.
  20. E

    How to link to an Excel named range using vba

    Thanks for the addition.
Back
Top Bottom