Search results

  1. MarkK

    Solved Adding Items to Combobox, but They aren't showing up

    Just change the combo's "BackColor" property to something other than "No Color". All the data is there, its just the BackColor is the same as the ForeColor.
  2. MarkK

    Solved Adding Items to Combobox, but They aren't showing up

    And ColumnWidths? If you want, run this code, and post what gets printed to the Immediate pane. Private Sub Form_Load() Dim fso As New Scripting.FileSystemObject Dim fd As Scripting.File For Each fd In fso.GetFolder(CurrentProject.Path).Files If Right(fd.Name, 6) =...
  3. MarkK

    Solved Adding Items to Combobox, but They aren't showing up

    Form_Load() is early in the lifecycle of a form. It's possible you have some downstream process that erases the contents of the combo. To test for this case, you can add this line of code after your For loop... Debug.Print Me.cboDataBases.RowSource ...which should show a semi-colon delimited...
  4. MarkK

    Let me be frank here...

    I think this is a really astute observation.
  5. MarkK

    Solved Stop code until other application finished

    The OutlookItem.Display() method takes an optional Modal parameter which defaults to False. If you set it to True, I think your code will pause at that line. Private WithEvents oli_ As Outlook.AppointmentItem Private cli_ As cOLCalendarItem ' . . . Set cli_ =...
  6. MarkK

    Automatically Refresh a form when table data changes externally, table macro perhaps?

    You can call back to the FE from a table macro if you wrap the function call in Eval(). Consider this screen shot.. So there's a 'Public Function CurrentUserID() As Long' in the FE, and this macro runs it, and sets the value of the field. This is a split Db, the table's in the BE. One...
  7. MarkK

    Mousewheel Event Bug in Version 2412

    Yes, I have run into this. Two machines at work fail exactly as described. Thanks for the update, much appreciated!!!
  8. MarkK

    Open New Form and Populate Fields Based on the Old Form

    Create a table called tProject with a field called AwardedDate. Then, write two queries, one called qProposal... SELECT * FROM tProject WHERE AwardedDate Is Null; ...and the other called qProject... SELECT * FROM tProject WHERE AwardedDate Is Not Null; Now create two forms, fProposal and...
  9. MarkK

    Code a date one week from another date

    me.tbOneWeekLaterThanSomeDate = me.tbSomeDate + 7
  10. MarkK

    Select from which date as a variable vba access

    Also, if you have done any custom calculations on your date values, they may no longer be stored exactly correctly in the table. Try this in the immediate pane... ? cdate(45670.8804976852) 1/13/2025 9:07:55 PM ? cdate(45670.8804976) 1/13/2025 9:07:55 PM Notice that 45670.8804976852 <>...
  11. MarkK

    Select from which date as a variable vba access

    To handle all embedded delimiters and date formats without cobbling together your SQL in code, I strongly recommend an approach more like this... Const SQL_SELECT As String = _ "SELECT * FROM DATA_CHECK_KLW_2024 " & _ "WHERE Year = pYear " & _ "AND Number =...
  12. MarkK

    Britain is Changing with Freedom at Risk

    It is also evangelical about the Earth being a sphere. Apparently they have "evidence," but there should be more balanced debate on this topic, because step out your front door and look around: It is F&*%ing flat.
  13. MarkK

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

    For those iterating over recordset rows to find rank, you might like the Recordset.AbsolutePosition property. This property is read/write. See also PercentPosition.
  14. MarkK

    Unique values

    Another approach is to enforce logic using classes rather than database constraints. In some cases, like this, where database constraints are not well suited to a problem, it is sometimes easier to just read all your data into classes that enforce the logic themselves. Iterating over a...
  15. MarkK

    Solved Continuous Sub-Form

    Describe the actual problem, for instance... • you take action A • you observe outcome B • outcome B is not acceptable because of criteria C Using a pattern like that to describe a problem will improve your luck.
  16. MarkK

    Crash on breakpoint

    With Compile on Demand enabled, the compiler is optimized for performance in two key ways: 1) It will only compile code on the current execution path. 2) It will preserve previously compiled code. As I understand it, this can lead to crashes because you might edit the signature of procedure...
  17. MarkK

    Crash on breakpoint

    If you post the database, I'll rebuild it. I wrote code to export each object to text file, and read it back into a new database file, so it is pretty fast. Also, I edit running code all the time. Maybe it's a no-no, but if you clear the compiler settings indicated below, you dramatically...
  18. MarkK

    Solved DAO Workspace Database Collection

    Do this in the immediate pane... ? CurrentDb Is CurrentDb False CurrentDb returns a different instance on each reference. This is an advantage because a DAO.Database maintains state. If ConsumerA runs a query, the Database.RecordsAffected() property returns how many rows were affected. If...
  19. MarkK

    timerinterval

    Can you post a demo of this? Does it break into the debugger? I have never seen VBA code just stop.
  20. MarkK

    timerinterval

    Setting Me.TimerInterval to zero disables the timer. The Form_Timer() event handler will never execute while Me.TimerInterval = 0. In addition, if you set Me.TimerInterval to x, and then before x has expired you set it to x again, you effectively delay the execution of the OnTimer event...
Back
Top Bottom