Recent content by craigachan

  1. C

    Solved Filtering Dates

    Here is my code. Keep in mind that this is based on a sql db that doesn't alway cooperate with MSAccess Queries. The way I found around it was to create a tables of the queries that I want and then it converts field data correctly. Thanks for everyones input. Based on the main...
  2. C

    Solved Filtering Dates

    Thank you all so much. I finally realized what arnelgp was explaining. It all works now. Here is my code: Dim startDate as date, endDate as date, dDate as Date, msql as string startDate = dDate - Weekday(dDate) + 1 endDate = dDate - Weekday(dDate) + 7 If...
  3. C

    Solved Filtering Dates

    Sorry about that: SELECT * FROM (SELECT *, DateSerial(ledger.[year], ledger.[month], ledger.[day]) AS DOS FROM ledger WHERE ((ledger.[year] + ledger.[month] + ledger.[day]) is Null) = False) WHERE DOS >= #9/25/2022# AND DOS <= #10/1/2022#
  4. C

    Solved Filtering Dates

    Like this? I get runtime 3065 cannot execute selected query
  5. C

    Solved Filtering Dates

    Sorry, to clarify my dDate is a date. So it is in the right format. I've attached a pic of the final sql.
  6. C

    Solved Filtering Dates

    Thank you so much. So here is what I have now. dim dDate as date, startDate as date, endDate as date, msql as string, msqlA as string startDate = dDate - Weekday(dDate) + 1 endDate = dDate - Weekday(dDate) + 7 msqlA = "SELECT *, DateSerial(ledger.[year], ledger.[month]...
  7. C

    Solved Filtering Dates

    I inherited a database where instead of a date field, the month, day, and year are in separate string fields in the table. If the dates that I want to filter span the end of one month to the beginning of the next month, how do I write this code: Example dates: 9/25/2022 to 10/1/2022...
  8. C

    Access 365 won't close

    Hi theDBguy. Thanks for your reply. I worked 2 days on this and in hind sight should have come to this forum first. I did have the 2201 update. So I rolled it back to the previous version and everything worked fine again. Of course I turned off auto updates for now. Well at least I cleaned...
  9. C

    Access 365 won't close

    I'm hoping someone has some knowledge of this issue. I have an FE and BE. Each workstation (the max using the front end is 3 persons) has the FE on their computer in \documents. My BE is on a server and has 2 databases that the FEs link to. ( I use alot of temptables when possible) one that...
  10. C

    Solved Select column value in a listbox

    Moke123. Thank you. I'll give it a try. I'm still trying to understand Class Modules and how they work. You make a lot of sense.
  11. C

    Solved Select column value in a listbox

    SOLVED - Works Perfectly how I initially wanted it to. A couple of things to take note of. 1. It won't work if you set the listbox.columnwidths with code. you must do it thru the access application interface. 2. Following MajP's examples for FindAsYouTypeListbox, in the actual form code I...
  12. C

    Solved Select column value in a listbox

    moke123 -Very nice idea, but should a certain filtered list exceed the number of buttons or form fields then what?
  13. C

    Solved Select column value in a listbox

    Class Module - ColumnListBox Option Compare Database Public CLB As New ColumnListBox Form CodesDx Option Compare Database Private WithEvents mListBox As Access.ListBox Private mColWidths As New Collection Private mClickedColumn As Integer Private mClickedValue As String Private Sub...
  14. C

    Solved Select column value in a listbox

    Thank you for all of your help. I'm learning a lot as I go along. I'm now having a problem with a different error. My listbox is me.lstDx. So I've modified the code to "CLB.Init Me.lstDx" in the Form_Load(). But now I'm getting a runtime "424-Object required" that error right at the same...
  15. C

    Solved Select column value in a listbox

    Thank you for your response MajP. I think your solution is exactly what I'm looking for. I'm trying to apply your code to my application but am having an issue. At first I added all of your code with the necessary changes to apply to my listbox. But I got: "The expression On Click event...
Top Bottom