Recent content by MarkK

  1. MarkK

    Squatters have rights. Homeowner arrested

    Is that all you have? Those stories are outrage-engine clickbait. In America you used to be able to buy and sell human beings. The arc of history tends towards justice. If you disagree, you are probably selling something.
  2. MarkK

    Module Import or Export

    If was your programmer, I would ask for the whole system, your FE and your BE. I would then make the requested changes to the FE. Then I would return the FE to you for testing, with an incremented version number, and a description of the changes made under that version number. If you are...
  3. MarkK

    Inserting numeric values into a Table, using SQL : What's the correct VBA code to use in the VALUES part of the code ?

    The difficult and error-prone problem of cobbling together SQL statements in code is why DAO allows you to create and run a temporary QueryDef. Here's a code example... Private Const SQL_INSERT_SCORE As String = _ "INSERT INTO tblTestScores " & _ "( dtTestDate, numScore...
  4. MarkK

    Object Invalid or No Longer Set Error

    You can also do this... Function FieldExists(table As String, field As String) As Boolean On Error Resume Next FieldExists = CurrentDb.TableDefs(table).Fields(field).Name = field End Function I timed them both on a seven column table, looking for the last column in the table, and they are...
  5. MarkK

    Filtering from a multiselect listbox with other filters

    Look at this block of code... If Me.ckPrimaryDiag Then strVisibleColumns = strVisibleColumns & "PrimaryDiag, " If Me.ckSecondaryDiag Then strVisibleColumns = strVisibleColumns & "SecondaryDiag, " If Me.ckDateEntered Then strVisibleColumns = strVisibleColumns & "DateEntered, " If...
  6. MarkK

    List of methods of a class in intellisense - 2

    It may also be important to note in this discussion that the VBA TypeOf operator can distinguish if an object implements an interface. Say you have an Access.Form called Form_Form1 and it implements IKitayamaControls and INavBarHost, then the following code... Dim frm As New Form_Form1...
  7. MarkK

    New line on IF Statement

    You also don't have to compare a boolean to True or False in order to determine if it is True or False, since, as a boolean, it is already True or False. As a result you can do.... Me.Chk1Discipline = Me.Chk2Discipline And Me.Chk3Discipline And Me.Chk4Discipline ...
  8. MarkK

    Pay your bills

    Yes. Understanding national defence spending policies of NATO member states? Just like gym dues. This is what I love about Trump and his followers: They can take complex and nuanced political and economic issues, and frame them so simply, that even an idiot can understand.
  9. MarkK

    Verify a File Path

    To solve this I would just create the path. If you can create it, it is valid. If you can create it, you can delete it.
  10. MarkK

    Solved Low Date not seeing the previous year

    You can also do... Function GetLeastDate(ParamArray dates()) As Date Dim var With CreateObject("System.Collections.ArrayList") For Each var In dates If IsDate(var) Then .Add CDate(var) Next .Sort GetLeastDate = .Item(0) End With...
  11. MarkK

    Getting proper date for VBA usage

    IMO, this is the most readable, maintainable, and reliable way to do that job, for your consideration... Const SQL As String = _ "INSERT INTO TransactionTable " & _ "( TheDate, Amount, Account ) " & _ "VALUES " & _ "( p0, p1, p2 )"...
  12. MarkK

    Error: Cannot open any more databases

    This code fails to close Form1 on my machine.... DoCmd.Close acForm, "[Form1]" I would remove the square brackets
  13. MarkK

    Undo changes

    You can try and hit the <Escape> key, or he the key combination <Ctrl>+<z>
  14. MarkK

    Error: Cannot open any more databases

    The problem is that this code... DoCmd.Close acForm, "[" & obj.Name & "]" ...does not actually close the form, and you don't realize it, because they are all hidden. In your DoCmd.OpenForm, command, try and open them such they are not hidden, and see if they are actually closing or not.
  15. MarkK

    Solved Move selected to top of listbox

    If you want to persist, between openings and closings of the form, the selected state of individual rows in a ListBox, you will need to persist the selected state of each row somewhere, somehow. Do you have such a structure in place?
Top Bottom