Recent content by ebs17

  1. E

    Insert Records with VBA and get new autonum value - different variants and possible problems

    A "proper" table in a database should not be a collection of duplicates, as far as I understand. Therefore. I don't think I'm reporting anything new. But at least the topic has been taken up again after many months and seems to have some significance besides eliminating boredom.
  2. E

    @@identity

    If this statement is not correct, then it is. CurrentDb has nothing to do with SQL Server. Since it is about inserting a single record (?), do not use a bound form here and use an unbound form instead, use an ADODB connection (or a DAO reference) to the backend and carry out the append query...
  3. E

    @@identity

    In Form_BeforeUpdate, an automatically generated primary key should already be available and readable. At this point, you also have access to the correct record and its key. The measure in Form_AfterUpdate is too late and not recommended. In addition, the bound form and CurrentDb have nothing to...
  4. E

    Insert Records with VBA and get new autonum value - different variants and possible problems

    To put it more precisely, as desired, one would replace "one unique attribute field" with a combination of fields, which then provides the natural key for the uniqueness of the record. However, this example natural key shows very clearly how advantageous a surrogate key made up of a single long...
  5. E

    Solved Need help for a non-updatable query

    How exactly should the update be done, manually in the list or via procedure/query? In the second case at least, you can remove PP.ProcessFK from the field list and thus also change the query. In general, I only update tables where this one table and its fields are in the SELECT part of the...
  6. E

    Solved Insert Into - Select

    If you ask me: I once perceived that DAO is optimized for Jet/ACE, while ADODB is better for other external databases.
  7. E

    Solved Insert Into - Select

    The connection technology is secondary. So yes.
  8. E

    Solved Insert Into - Select

    That's enough to do the same thing. ... WHERE O.OrderPK Between 5 AND 10 Without the brackets in the JOINs, you should have valid T-SQL syntax here. With an ADODB connection to the BE, you could run the query directly in the SQL Server.
  9. E

    Crosstab/Parameters/Reports combo

    I have two suggestions: 1) Parameter passing and processing is much easier if you combine the three queries into one. This can be achieved by simply copy&paste. It is easier to pass parameters to a single query, even to lower query levels. 2) The parameter passing as you use it inevitably...
  10. E

    Solved Insert Into - Select

    Note: I didn't notice the example database, so I wrote the SQL statement by hand. Therefore, two table names are not entirely correct.
  11. E

    Solved Insert Into - Select

    SELECT O.OrderPK, PP.ProcessFK FROM (tblOrder AS O INNER JOIN tblProducts AS P ON O.OrderProductFK = P.ProductPK ) INNER JOIN tblProduct_Processes AS PP ON P.ProductPK = PP.ProductFK You can certainly add the INSERT INTO line yourself. This is what your...
  12. E

    Solved Kill working manually but not in code

    What custom methods can a CSV file have? A plaintext file with only data is the most innocent thing you can imagine.
  13. E

    Trigger event by writing value to a field

    If you use VBA in such a targeted manner, you can also call the desired function. You don't need an extra event for this. However, you would have to check separately before calling the function whether the content of the control really changes when it is overwritten using VBA. This raises the...
  14. E

    Am I the only one that switches ABBA off?

    However, these rallies are not about listening to music, but about highlighting individuals and political views. Musicians and other artists have their own views and attitudes and do not necessarily want to be taken over by others with the assumption that they are marching in lockstep. Who...
  15. E

    Insert entry in table with only default values

    In which SQL dialect do your attempts work? ? accesserror(3134) Syntax error in the INSERT INTO statement. To the point: In the record to be created, at least one value must be written correctly and thus assigned so that the default values are adopted as field contents. However, this basic...
Back
Top Bottom