Search results

  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...
  16. C

    Solved Select column value in a listbox

    Thanks bastanu. I was hoping there might be a great way to do this. But I guess my only way is to create a single column listbox and then when the user clicks it will be column(0). Thanks for all of the input. Thanks GPGeorge also. I'm going to use a group option buttons at the top of the...
  17. C

    Solved Select column value in a listbox

    Thank you for your responses. What I'm getting as is if the user clicks 'Wave'. How does the code know when the user is clicking row 1 and column(3)? I don't understand how the code knows which column the user is clicking? Does that make any sense? What if the user clicks something in...
  18. C

    Solved Select column value in a listbox

    I have a listbox that is populated with a value list. The listbox has 4 columns. Each value in the listbox is its own unique value. Is it possible to click and return a value in a column or row. Example: 5 Tooth Wave 87 tree YY GRF 760 How would I click select a specific...
  19. C

    Solved Runtime 3155 with SQL database

    Great suggestion. I'll recode to the SelectMax(). The sql database that i'm linking to is part of another application that I can' change at this time. So I'm stuck with doing it this way. Thanks again.
  20. C

    Solved Runtime 3155 with SQL database

    Hi bastanu, Yes I can manually add a record. But here is what I found. What I thought was the primary key ('RID') in the referral table was in fact an indexed field but not an autonumber. So it was not generating a new record id at all. This created a violation. The fix, was to open the...
Top Bottom