Search results

  1. M

    Is there a way to iterate from bottom to top of range?

    Good morning all, I posted on here last week regarding a loop I've been working with and we touched upon the topic of iterating 'backwards', as it were, through the range. The loop I've been working with looks like this: Dim rnArea As Range Dim rnCell As Range Set rnArea = Range("D8:D1000")...
  2. M

    Help with infinite loop please

    And you too my friend. Matthew
  3. M

    Help with infinite loop please

    Hi Mailman, Yes that works too, thanks. It's a bit more concise than mine too ;) Thanks for your help. Matthew
  4. M

    Help with infinite loop please

    Ahh... I think I have it. This seems to be a simple solution that works, I've added a line that simply marks the record above the first entry of the customer group: Sub NEWTEST2() Dim rnArea As Range Dim rnCell As Range Set rnArea = Range("C8:C1000") For Each rnCell In rnArea With...
  5. M

    Help with infinite loop please

    Hi Mailman, Yes that's the code that I posted in my first message that I said works fine. It adds a row below the group. My problem is that I also need to add a row above the group. For example Customer 1 Customer 2 Customer 3 Customer 3 Customer 3 Customer 4 Customer 5 Should become...
  6. M

    Help with infinite loop please

    Any other suggestions still welcome! Matthew
  7. M

    Help with infinite loop please

    Thanks Mailman, but where exactly should I put that? I've already managed to navigate my way around the sheet for comparisons using offsets. I've added your code before the next command, assuming that's what you meant, but it doesn't change anything, adding a new row above the cell currently...
  8. M

    Help with infinite loop please

    Hello all, I have built a macro which formats a sheet of data to meet a specification. It works fine, but I have recently encountered the need to format some data differently. I was hoping to keep my old macro and then build another that could be run afterwards to add some final formatting if...
  9. M

    On Report: Hide duplicates

    Ahh! Just realised what the problem was. The final 'if' should have read as follows: ElseIf Me.txtWeaver_Name.IsVisible = True Then Me.txtFault_Type.Visible = True End If Thanks anyway! Matthew
  10. M

    On Report: Hide duplicates

    Right well, I've found that my problem was caused by me not declaring the public variable properly. But I still have a problem. I'm working on a report that lists all of the faults detected in a given time period for each weaver. The report lists each weaver and next to it the type of fault that...
  11. M

    On Report: Hide duplicates

    Hi guys, I'm working on what is basically the same scenario, but I'm having problems with RG's code. No matter where I declare the variable it always enters the if statement blank, even if it's had a new value assigned to it; it will contain the value for the remainder of that record, and then...
  12. M

    Report Keeps Forgetting Printer Settings

    Do you have multiple versions of Access installed? I have 2002 and 2007, but I mostly use 2002. I seem to remember that when I first tried to install the hotfix it yielded an error. Wondering if it was because 2002 was the last version I used, I opened a document in 2007, waited for it to...
  13. M

    Catching an error message that I do not know the error number of

    Thanks for that, exactly what I wanted! Thanks again.
  14. M

    Catching an error message that I do not know the error number of

    Okay, thanks for that. Before I add this code though, can I just confirm that the effect of this would be as if I had pressed the 'Yes' button on the message box?
  15. M

    Catching an error message that I do not know the error number of

    Good morning, I'm running an append query as part of a stack of queries in a macro. The data that the append query is retrieving comes from a much older system that contains the occasional instance of records with matching ID fields. In such cases, it isn't feasible for us to find which is the...
  16. M

    Modify Error Messages

    Also look in any macros that the system has, it's possible to set message boxes in there too.
  17. M

    Date Format Issue

    Thank you very much DCrake, that works perfectly. Thank you too namliam, is the general consensus that I should datediff without the conversions?
  18. M

    Date Format Issue

    Hello all, I have encountered a problem with using date values in a calculated field in a query. The root of this problem can be found on a form in the system front end, which offers the users a default date using the now() function (which also adds a time on to the end of the date). The...
  19. M

    Correlated Subquery

    Haha :) Thanks for taking the time to offer help.
  20. M

    Correlated Subquery

    Got it! It needed more criteria, here's the working code: SELECT PieceNo, Warp_Stock_Transaction_ID, Warping_Diff FROM zqryWarping_Data2 AS a WHERE Warping_Diff = (SELECT min(Warping_Diff) FROM zqryWarping_Data2 AS b WHERE a.PieceNo = b.PieceNo);
Back
Top Bottom