Recent content by essaytee

  1. essaytee

    [Solved] Trying to replace "On Error Goto Err_SomeFunction" with "On Error Goto Error_In_Code"

    Problem rectified. It all came down to casing. Changing the various sample ChatGPT code snippets to "IgnoreCase = True" fixed the issue. There is some follow-up in the ChatGPT thread above.
  2. essaytee

    [Solved] Trying to replace "On Error Goto Err_SomeFunction" with "On Error Goto Error_In_Code"

    Yes, the "Error_In_Code" label is local to the function or procedure. I've only specified half the issue of standardising the error handling routine. Yes, I will be addressing the other half. I also have when in the error stub, "Resume Exit_ErrSomeFunctionName" and that will be replaced...
  3. essaytee

    [Solved] Trying to replace "On Error Goto Err_SomeFunction" with "On Error Goto Error_In_Code"

    Ok, I first went the ChapGPT route for the solution but I haven't got it working. What I want to do is replace all my error handling routines with standard code snippets. For some of my functions, across many modules, I have "On Error Goto Err_SomeFunctionName" and I have the corresponding...
  4. essaytee

    [SOLVED] VBA - Excel - how to extract the default font color

    Using ChatGPT I came across this solution. I haven't tried it yet but I assume it would do the trick. Dim defaultColor As Long defaultColor = ActiveWorkbook.Styles("Normal").Font.Color MsgBox "Default Font Color: " & defaultColor
  5. essaytee

    [SOLVED] VBA - Excel - how to extract the default font color

    Thanks, simple, why didn't I think of that.
  6. essaytee

    [SOLVED] VBA - Excel - how to extract the default font color

    Thanks all for the responses. As usual, I overthink things. My executive decision is to simply refer to Black as my default colour, which it is anyway. I am the one creating the spreadsheet and then distributing it. It's not the case of me tinkering with somebody else's spreadsheet.
  7. essaytee

    [SOLVED] VBA - Excel - how to extract the default font color

    In Access VBA when creating Excel spreadsheets, how do I extract the default font color? I have a routine where I cycle through a recordset and one particular field has one of three possible values, a positive number, zero or negative number, that are text fields, not numbers. (It's a...
  8. essaytee

    Why messagebox appears then closes on successful run of DoCmd.OutputTo....pdf

    Everything works, the report is saved correctly, so wasn't worried about any logic. With the messagebox appearing it did raise a doubt that something might not be right. So, if that is the case, I can remove the Application.Echo commands.
  9. essaytee

    Why messagebox appears then closes on successful run of DoCmd.OutputTo....pdf

    I am successfully printing a report directly to pdf via the command, DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, strFile, False Everytime I run the code there is a messagebox that appears and instantly disappears, though I can't read the contents of the messagebox. This happens...
  10. essaytee

    Is it possible: Query/SQL to dynamically display a record/order/position number, without underlying field from a table

    I'm still having the same issue that the first record is being accessed twice, according to my debug window. For my particular purposes I don't require a where clause filter, but if employing this method, I'd have to first run the function to reset it back to zero and then call the query. At...
  11. essaytee

    Is it possible: Query/SQL to dynamically display a record/order/position number, without underlying field from a table

    Thanks for that, yes, now I can replace my counting variable for record number with the .AbsolutePosition + 1 property.
  12. essaytee

    Is it possible: Query/SQL to dynamically display a record/order/position number, without underlying field from a table

    I modified the argument list to set v = null, as follows: Function rownum(Optional v As Variant = Null) As Long Static r As Long If IsNull(v) Then r = 0 Else r = r + 1 Debug.Print "v = " & v & " --- and --- r = " & Str(r) End If rownum = r End...
  13. essaytee

    Is it possible: Query/SQL to dynamically display a record/order/position number, without underlying field from a table

    I'm returning to some Access data manipulation and I've come across a situation I thought was possible, but can't figure it out. I have adopted a work-around (explained at the end), but I thought there is a less-convoluted way. I have a table that records running times of runners for each...
  14. essaytee

    [SOLVED] Calculated column not sorting by largest to smallest

    Update: Well, don't I feel like a complete dill. I applied the largest to smallest sort on the affected columns and the same result, rows disappear. I scrolled down many, many rows and there were the other rows, in largest to smallest order.
Back
Top Bottom