Search results

  1. AOB

    Format textbox with special case for "1"

    I have a textbox control that displays the number of workdays between two dates. I am using a custom format to suffix " days" after the number for clarity : #,##0" days";[Red]#,##0" days" I'd like to modify this so that when the value is 1, it displays "1 day" rather than "1 days" Tried using...
  2. AOB

    Solved Continuous subform displaying boolean results differently to underlying query

    Figured it out... The subform property Recordset Type was set to Snapshot. Changing this to Dynaset somehow made the results in the subform, match the results in the actual query. Working perfectly now. I'm not entirely sure why this is relevant here, given that the data is static. I can't...
  3. AOB

    Solved Continuous subform displaying boolean results differently to underlying query

    Thanks @arnelgp , very interesting! However... I have followed the steps you suggested and modified the query thusly (bearing in mind the suggestions by @ebs17 above to remove the INNER JOIN) SELECT qC.CategoryID, qC.SubCategoryID, Val(Nz(jE.Selectable, qC.SubCategoryActive)) AS IsSelectable...
  4. AOB

    Solved Continuous subform displaying boolean results differently to underlying query

    Thanks @ebs17 I do take your point on the superfluous INNER JOIN and have moved those details into the initial "combo" query thus : SELECT C.CategoryID, SC.SubCategoryID, SC.Active AS SubCategoryActive FROM tblCategories C, tblSubCategories SC However, to your two other observations, I suspect...
  5. AOB

    Solved Continuous subform displaying boolean results differently to underlying query

    I'm getting really strange behaviour trying to apply a (relatively simple) query as a data source for a continuous subform. The query works when I run it directly, but when I use it as the data source for the subform, some of the values are not the same. Trying to figure it out before I try a...
  6. AOB

    Solved Sort transformed columns non-alphabetically with TRANSFORM / PIVOT query

    It's not, my sort field - [SortOrder] in the Phases table - is a numerical field? And ordering prior to the pivot makes no difference; the pivot is still going to apply those transposed columns alphabetically as it sees them. But my previous post looks like it will do the trick - a tad messy...
  7. AOB

    Solved Sort transformed columns non-alphabetically with TRANSFORM / PIVOT query

    Okay this seems to work... TRANSFORM First(tblHistory.StartDate) AS FirstOfStartDate SELECT tblHistory.ProjectID FROM tblHistory INNER JOIN tblPhases ON tblHistory.PhaseID = tblPhases.PhaseID GROUP BY tblHistory.ProjectID PIVOT Format(tblPhases.SortOrder,"0000") & " - " & tblPhases.Phase; Only...
  8. AOB

    Solved Sort transformed columns non-alphabetically with TRANSFORM / PIVOT query

    I tried this : TRANSFORM First(tblHistory.StartDate) AS FirstOfStartDate SELECT tblHistory.ProjectID FROM tblHistory INNER JOIN tblPhases ON tblHistory.PhaseID = tblPhases.PhaseID GROUP BY tblHistory.ProjectID PIVOT tblPhases.SortOrder & " - " & tblPhases.Phase; But that doesn't work properly...
  9. AOB

    Solved Sort transformed columns non-alphabetically with TRANSFORM / PIVOT query

    Thanks @Gasman but you've lost me there? How can I alias a pivot field and how would that get around the sorting issue?
  10. AOB

    Solved Sort transformed columns non-alphabetically with TRANSFORM / PIVOT query

    I have two tables with a one-to-many relationship which I want to be able to query in order to "flatten" the data for reporting purposes. I have a table of "phases" and a table of "phase histories" which records the start and end dates for each parent project for any of the phases through which...
  11. AOB

    Making an old 32-bit MDB file 64-bit-compilable

    Thanks @arnelgp that is extremely kind! However, I just checked in with the owners and they reckon the user base are entirely on 64-bit M365 now so rather than trying to make it compatible with both versions, I've simply gone through all the variables (compile > debug > redim > repeat) and...
  12. AOB

    Making an old 32-bit MDB file 64-bit-compilable

    This would 100% be the correct and proper thing to do in this scenario, and normally that is precisely what I would do, but a) it's not my database, b) it's not even my responsibility, really (I am just helping out), c) i have no idea why these API's are used, or where, or for what purpose and...
  13. AOB

    Making an old 32-bit MDB file 64-bit-compilable

    Hi guys, Hoping somebody can save me some heartache here... I've inherited a very old database (MDB) format. It references a tonne of Windows API's (rough count of between 70-100 declarations) and obviously 64-bit Office wasn't on the horizon back then as none of them use conditional compiling...
  14. AOB

    GetSelectNamesDialog - specify display position

    Hi there, I'm using the GetSelectNamesDialog from Outlook as a means for users to identify / select contacts : Dim appOutlook As Object Dim objNameSpace As Object Dim objSelectNamesDialog As Object Set appOutlook = CreateObject("Outlook.Application") Set objNameSpace =...
  15. AOB

    Textbox Input Mask - cursor always defaults to rightmost location (end of mask)

    Got too frustrated messing with labels and frames and transparency so ended up just removing the mask altogether (I can see now why CJ doesn't use them, I may follow in those footsteps) and creating a function to clean up the entered value and call it from the After_Update event of the textbox ...
  16. AOB

    Textbox Input Mask - cursor always defaults to rightmost location (end of mask)

    Checked, and played with, but had no effect (was not aware of those settings, however, so will remember for future reference, thank you!)
  17. AOB

    Can't edit values in continuous subform

    It's not the only reason I did it...
  18. AOB

    Textbox Input Mask - cursor always defaults to rightmost location (end of mask)

    Understood but the people I'm building this for need that field to store the full string, i.e. "ABC-123456" not just the numeric part. It just needs to confirm to the pattern.
  19. AOB

    Textbox Input Mask - cursor always defaults to rightmost location (end of mask)

    I can't post a copy of the DB but there really isn't much more to it than what I've described above? When I click into the textbox, ABC- appears, but also the 6 "placeholder" spaces and the cursor is at the end of them. I have to reposition the cursor or backspace through the spaces to start keying.
  20. AOB

    Textbox Input Mask - cursor always defaults to rightmost location (end of mask)

    I'm trying to do something that seems very simple but can't quite get it to work as intended. I have a textbox (unbound) to which I want to apply an input mask. Basically, I want to restrict the user to only enter values of the form "ABC-099999" - in other words, it must be prefixed with the...
Top Bottom