Recent content by Michael.Koppelgaard

  1. M

    use an Access query as input to dLookup

    I'm not interested in the dCount, but thanks anyways:) I'm only trying to get res = DLookup("*", "Q_sending", "*") to run, but it seems it not possible. I also tried without the *
  2. M

    use an Access query as input to dLookup

    I'm not interested in the dCount, but thanks anyways, :) I'm only trying to get res = DLookup("*", "Q_sending", "*") to run, but it seems it not possible. Also tried without the *
  3. M

    use an Access query as input to dLookup

    It's possible to use a query from Access as input to dCount. dim n as integer n = DCount("*", "query1") I'm wondering if you can do the same thing with dLookup? I get an error when I try; Dim res As Variant Set res = DLookup("*", "query1")
  4. M

    Combine 2 tables and at the same time write it to a third table

    Yes is that is exactly what I want :) Otherwise I should use UNION ALL, correct?
  5. M

    Combine 2 tables and at the same time write it to a third table

    Okay I understand. But when I put in the SQL in the SQL window and click the Make Table button the SQL disappears… But now in found another solution. I write it all in SQL: SELECT ID into table3 FROM( SELECT ID FROM Table1 UNION SELECT ID FROM Table2);
  6. M

    Combine 2 tables and at the same time write it to a third table

    I'm very new in sql. Could pleace write the SQL neaded ?
  7. M

    Combine 2 tables and at the same time write it to a third table

    Hi I want to combine table1 and table2 using union and at the same time write the result to a third table (table3) I tried this: SELECT ID INTO TABLE3 FROM Table1; UNION SELECT ID INTO TABLE3 FROM Table2; but I get the error : "an action query cannot be used as a row source" Is what I'm...
  8. M

    short date in a table

    Wow ... thank you for a great explanation! Now I understand :):)
  9. M

    short date in a table

    It is weird though that when you sort dates in American format (newest first) its sorted, as if they were in the format dd-mm-yyyy.. Than means that 12/08/2022 (8. December) comes before 08/12/2022 (12. August)
  10. M

    short date in a table

    Thank you for the tip and article. "yyyy-mm-dd" did the trick :)
  11. M

    short date in a table

    Thank for the reply: My code is here: DoCmd.RunSQL "INSERT INTO tb_LagerUdenNummereredeKasser ( PlaceringID, AnsvarligVipID, AnsvarligTapID, AktNr, IndsatDato, FjernesDato, Prøvebeskrivelse )" _ & "SELECT " & PlaceringID & "," & Me.Combo_VIP.Column(0) & "," &...
  12. M

    short date in a table

    Using VBA I put date values into a table with this input mask : Format(Me.Txt_dato_ind, "dd-mm-yyyy") The date field in the table are formated to short date. But it seemes that the date are recorded into the fields with month before day: mm/dd/yyyy. The general format for my computer are...
  13. M

    Change the selected index of an Access combobox using VBA

    SORRY ! I WAS WRONG. YOUR SULUTION WORKS PERFECT :)
  14. M

    Change the selected index of an Access combobox using VBA

    Hi arnelgp My problem is that combo14 consists of 2 columns. If I only change the value of the combobox (as I think your code do) I will not change the index. I need to change the index also.
  15. M

    Change the selected index of an Access combobox using VBA

    Hi everybody I'm trying to change the selected index/item of an Access combobox using VBA. I tried this Me.Combo14.ListIndex(1) = True but listindex is a read-only property. What can I do? Michael
Top Bottom