Search results

  1. L

    Solved Delete specific rows using vba

    A lot easier to understand and more efficient it seems. Thank you
  2. L

    Solved Delete specific rows using vba

    Thank you, went a slightly different way but the Sql and the Autonumber hint was essential for my brain to kick in Sub RemoveTBDuplicates(strTablename As String) Dim db As Database Dim rst, rst2 As Recordset Set db = CurrentDb Set rst = db.OpenRecordset(strTablename) Set rst2 =...
  3. L

    Solved Delete specific rows using vba

    I have a table with duplicate records but also semi duplicate records. SpNo SpDate DateAuth Result CulComment B1445677 15/06/2020 26/06/2020 NO res myo comm B1445677 15/06/2020 26/06/2020 -------- myo comm...
  4. L

    compare tables and delete oldest record from either table

    This seems to solve the problem. Slight change in approach as any records in input table will always be the most up to date so I only need to remove the records from the destination table with the same spnumber. Can anyone see any potential issues or cleaner code. "I will add error code after"...
  5. L

    compare tables and delete oldest record from either table

    I need to compare a small source table (upto 100 records) with a much larger destination table (20000). If the ID is the same I need to delete any records (there may be more than one) that are older in the destination table. It doesn't matter if the other fields differ as the newer records...
  6. L

    Using vba to remove old duplicates from an Access table

    This problem is more about getting the data in from multiple automated inputs into a flat file table which will be the source file for another system. Sent from my iPhone using Tapatalk
  7. L

    Using vba to remove old duplicates from an Access table

    The following is in no way meant to be or sound condescending Ok to explain a little more. The original record could output one line or more depending on current results for specimen as the output delivers 2 lines if 2 comments are added. This could then change to no result eg only 1 line...
  8. L

    Using vba to remove old duplicates from an Access table

    I do understand where you are coming from however the problem is they are not true duplicates as the later records will be an updated version but the original record is required to ensure tests are in the system. Only a few fields will be identical and I need to be able to remove the old ones...
  9. L

    Using vba to remove old duplicates from an Access table

    Yes this works perfectly. I was playing with using a recordset and a cloned recordset but this does the job without all the code.
  10. L

    Using vba to remove old duplicates from an Access table

    I have 31 tables which as they are updated are appended to the Master table (bad name should call holding but for this example I called it Master). The Master Table could have upwards of 5000 records depending on when it is updated. I need to remove the duplicates before moving the data to...
  11. L

    How manipulate data export in rows to become in columns

    You both gave very valid answers and I was just being stupid I couldn't get my result field to diplay the sensitivity but just a number. Might have helped if I had used "First" rather than Sum or count. Thank you I always try to make things more complicated than they are.
  12. L

    How manipulate data export in rows to become in columns

    I have an excel spreadsheet (example attached) which is populated by lab equipment. The key field is the specimen number and specimen type. Currently for every antibiotic there is a row with its result. My output is 3 complete worksheets so a lot of data. I need to create a database with one row...
  13. L

    Easy create new table in Access 2010

    This is probably dead simple, I have always been used to writing vba for Access Xp (haven't done so for a few years) etc where Dim db as database Dim rs as recordset Set db = Currentdb Set rs = db.CreateTableDef (sorry your correct) etc etc but I cannot seem to do this anymore in...
  14. L

    How to capture print job being started in vba

    Looks exactly what I need thankyou:)
  15. L

    How to capture print job being started in vba

    Thanks for your prompt reply however what I am really after is how in vba would I capture the print command being used on this report / query as people are likely to view the query often but only print once a month. Hope that makes more sense. Once the print command is used in relation to this...
  16. L

    How to capture print job being started in vba

    I have records which get printed each month for staff to be paid. What I would like to do it when a record has been sent to print a check box be filled in the main table so I can determine whether a record has been printed off already. This is incase staff are late with their paperwork I can...
Top Bottom