Search results

  1. MarkK

    DB behavior is bizarre

    You can also try changing the font and see if that makes a difference. Some fonts don't seem to calculate their spacing correctly, and it's like the insertion point is not where you think it is. You type, and the characters are not inserted into the string where you expect.
  2. MarkK

    Export works, but spec not in MSysIMEXSpecs list

    CurrentProject.ImportExportSpecifications is an object in your database. You just type it in, and *poof*, you are there. Sub ShowIMEXSpecs() Dim spec As ImportExportSpecification For Each spec In CurrentProject.ImportExportSpecifications ' *poof* Debug.Print spec.Name...
  3. MarkK

    Export works, but spec not in MSysIMEXSpecs list

    Check out CurrentProject.ImportExportSpecifications, which is a collection of saved ImportExportSpecification objects. To return a member of the collection, you can use its name, or its numeric index. Note that your code declares and assigns a value to a variable FileName, but that value is...
  4. MarkK

    How do I code delete a record from a combo Box with a button

    Just to show some other options... Private Sub DeleteRecord_Click() Dim rsp As VbMsgBoxResult rsp = MsgBox( _ "THIS ACTION DELETES THIS RECORD." & vbCrLf & "DO YOU WANT TO DO THIS?", _ vbYesNo + vbExclamation + vbDefaultButton2, _ "Confirm Delete") If rsp...
  5. MarkK

    Refresh Listbox Query

    I would do the query like this.... SELECT CustomerID, Customer FROM Customers WHERE Customer Like [prm] ORDER BY Customer I would do the code like this... Private qdf_ As DAO.QueryDef Private Property Get qdfMembers() As DAO.QueryDef If qdf_ Is Nothing Then Set qdf_ =...
  6. MarkK

    How to validate 'time' value from Excel spreadsheet

    ChatGPT says you can disable Excel paste options as follows... Disable Paste Options Button: Go to File > Options > Advanced. Under "Cut, Copy, and Paste," uncheck "Show Paste Options button when content is pasted." I have not tried it, but I definitely ask ChatGPT a lot of questions.
  7. MarkK

    A day in the life...

    Nice job bookending my day! Sweetness at the start, and now, omg, cuteness to close it out. You're a rich man there NG. Cheers,
  8. MarkK

    How to validate 'time' value from Excel spreadsheet

    Here's one way you can get your sub column... Function GetSubColumn(iCol As Integer, Optional iRow As Integer = 2) As Excel.Range With Sheet1.Columns(iCol) Set GetSubColumn = Sheet1.Range(.Cells(iRow), .Cells(.Cells.Count - iRow)) End With End Function In the With block we...
  9. MarkK

    A day in the life...

    What a sweet post. Not a lot of things outshine the pleasure of my morning coffee, but this... Brilliant. Thanks, Mark
  10. MarkK

    When was my Worker's Last Day Off?

    One approach, write a query like... SELECT DateValue(YourDateTimeField) As DateWorked FROM tClock WHERE EmployeeID = 123 GROUP BY DateValue(YourDateTimeField) ORDER BY DateValue(YourDateTimeField) DESC; Now open a Recordset on that query, enumerate its rows, and the first date you find missing...
  11. MarkK

    How to Simplify MS Access Form Searches Using Class Modules and Collections to Pair Text Boxes and Option Groups for Efficient SQL Query Generation

    If you are starting out working with custom classes, note this debugger setting... If this is not set, the debugger will not break at the error in your custom class, it will break at the line making the call in the consumer.
  12. MarkK

    database closes when report is modified

    You can also try to decompile the program file first, before doing a complete rebuild, and see if that makes a difference. During development I fairly commonly get the same crashy kind of behaviour you describe. I keep a shortcut on my desktop with this as the Target... "C:\Program...
  13. MarkK

    How to validate 'time' value from Excel spreadsheet

    You can force data validation in cells. Check out ribbon path: Data->Data Tools->Data Validation. This opens a dialog that lets you pick various formats, including Time. A time range is required, so you can do Start=0, and End=23:59:59.
  14. MarkK

    Access Not Using Default Database Folder

    If you start MS Access from a shortcut, the value of the shortcut's "Start in" field may override your MS Access File->Options->"Default Database Folder" setting.
  15. MarkK

    Our economy

    If the United States is in decline, it is because you have lost respect for each other, and you would rather see the other side lose, rather than work together for a shared win.
  16. MarkK

    Our economy

    Neither party is talking about paying off the debt as a national priority. This is a systemic problem, not a partisan one. The biggest problem in the US, the way I see it as a Canadian anyway, is that all your hyper-partisanship is getting in the way of you solving actual problems. Republicans...
  17. MarkK

    Executing a "Saved Import" or "Saved Export" programmatically

    Beaucoup bienvenue.
  18. MarkK

    Solved Type mismatch

    I would never rely on data previously loaded into ListBox columns to perform an operation that matters. A ListBox is for selection in the UI. The format of the data it contains, if it contains anything, will all be strings. This is prone to error, as you are finding, and subject to change...
  19. MarkK

    Executing a "Saved Import" or "Saved Export" programmatically

    Private Sub cmdExecuteSpec_Click() CurrentProject.ImportExportSpecifications("SpecName").Execute End Sub
  20. MarkK

    How to validate 'time' value from Excel spreadsheet

    The question you ask, can Access VBA read formatted data from Excel? Yes. What matter though is how. Maybe provide an Excel sheet with a demo of the data and formats you actually encounter. A solution is going to come down to understanding the very precise details of the actual problem.
Back
Top Bottom