Search results

  1. AOB

    UPDATE with LEFT-JOIN (conditional update query)

    I am trying to UPDATE a table based on the result/value for the corresponding record in a separate query. This is the basic syntax of the query : PARAMETERS SpecifiedRecordID Long; UPDATE tblRecords R LEFT JOIN qryOutstanding AS Q ON R.RecordID = Q.RecordID SET R.LockID =...
  2. AOB

    Windows Colour Dialog (aka ChooseColorA) - can the "basic" colours be changed?

    Does anybody know if, when calling the Windows Colour Dialog (to provide an option for a user to select a colour for something) : Open the Windows Color Dialog from VBA ...is it possible to define, set or change, the Basic Colours that are loaded into that dialog (as opposed to the Custom...
  3. AOB

    Solved Detect whether a combobox selection has actually changed or just reselected?

    I have a form with a number of "cascading" comboboxes, each with simple Table/Query RowSources. When the user selects an option from the dropdown of the first combobox, the second combobox is requeried and revealed, with options relevant to the first selection. And so on down the list; each...
  4. AOB

    Solved Insert records where ID combination not already present (JOIN expression not supported)

    I'm trying to build a query that will insert new records into a table, which is effectively two columns of ID's (essentially foreign keys to/from two other tables) where the combination doesn't already exist. Basically, I have a source file/table, to which I join on respective fields to...
  5. AOB

    Solved Parameterised query requires me to re-cast parameter in order to run (?)

    I have a query which takes a parameter (a User ID) and then appends a record to a table using that parameter, along with a couple of other fields from a staging table, assuming a similar record doesn't already exist (tested using an outer join). Not a complicated query and I have dozens of...
  6. AOB

    Insert Unicode Character in textbox

    I have a textbox into which I want to insert (programmatically) some text along with some unicode characters. The textbox is purely informational, it's locked to users and only populated by code. Have formatted the textbox with the Segoe UI Emoji font and want to insert some of its characters...
  7. AOB

    Solved 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...
  8. 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...
  9. 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...
  10. AOB

    Solved 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...
  11. 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 =...
  12. 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...
  13. AOB

    Can't edit values in continuous subform

    I have a form with a continuous subform. The subform uses a local staging table as its record source; that staging table is cleared and refilled when the main form is loaded such that the staging table only contains the records specific to the record for the main form. The idea being that I can...
  14. AOB

    Sort Order clean-up query

    I have a number of tables which include a SortOrder column (i.e. to allow the contents to be sorted in a query based on some attribute other than simple alphabetical or numerical order of a particular field or combination of fields) ID Value SortOrder 4 ABC 100 2 DEF 200 3 GHI 300 1...
  15. AOB

    Detect a change in a subform, from the main/parent form

    Fallover from question on this thread (related but not the same problem...) I have a continuous subform which lists a set of data from a query. In the header section I have a hidden textbox which holds the ID of the currently selected record. I have a button which updates the value in this...
  16. AOB

    Can't deselect item in non-multi-select listbox?

    I'm embarrassed to even ask this question but for some reason I can't figure it out... Very, very simple problem - I have a ListBox that has Multi-Select set to None (i.e. only allow one item to be selected at any time) When I select an item, I can't seem to deselect it again? I can only...
  17. AOB

    Solved Using a textbox instead of a checkbox - translating actual values to corresponding Wingdings characters?

    Came across this thread in the Code Repository as a neat little workaround for displaying checkboxes a little larger and with a touch of colour but struggling with one tiny detail (and the thread is no longer open for replies) if anyone can point me in a direction? How does one "translate" the...
  18. AOB

    DELETE query with OUTER JOIN on sub-query (AC365)

    Hi all, Have a suspicion what I'm trying to do is simply not possible in Access (as opposed to SQL Server) but figured I'd ask before completely scrapping it. I have a table - consisting of two fields of ID's (basically a junction table) - but no formal relationships, so no foreign keys etc...
  19. AOB

    Solved VBScript to determine bitness of local MS Access version

    Hi there, I've run into some difficulties with a distributed Access DB (that is, a central ACCDB backend with distributed ACCDE frontends) The front end utilises some API's which obviously have to be declared differently in the two configurations (made pointer-safe in 64-bit) and I've...
  20. AOB

    Solved Access keeps crashing when trying to open ACCDB master file (MS Access for Microsoft 365 MSO 64-bit)

    Hi there, I've been making some modifications recently to an Access DB that's been in production for several years. Standard FE/BE split design, single BE ACCDB sitting on a network drive and distributed FE ACCDE's. I have a master copy of the FE locally and I make whatever updates are...
Back
Top Bottom