Recent content by newcomer

  1. N

    Using a listbox to delete a record

    Yeah, that's what I was suspecting when I changed the criteria field - a date formatting issue. VBA always expects dates to be in american format. Anyway, with this new criteria field (a text type one), everything works fine, once this field also has unique records. From now on, I'll have to...
  2. N

    Using a listbox to delete a record

    Sorry, my bad. I can get the record using a normal query window.
  3. N

    Using a listbox to delete a record

    No records returned with the code you mentioned. But if I build a query from scratch and call it from VBA, it works: QUERY NAME: Anyone QUERY TYPE: Delete query TABLE CHOSEN: Feedbacks FIELD CHOSEN: Sending_Date CRITERIA: Where Sending_Date = Forms!Name_of_the_form!lstFeedbacks
  4. N

    Using a listbox to delete a record

    Now it's correct (ir it should be). The immediate windows shows... Delete * From Feedbacks WHERE [Sending_Date] = #08-01-2013 16:15:16# ... but nothing happens. No message errors, but no deletion either. The record is still in the table. :( The listbox (lstFeedbacks) gets the data directly...
  5. N

    Using a listbox to delete a record

    In the immediate window, I have exactly this: Delete * From Feedbacks WHERE [Sending_Date] = 08-01-2013 16:15:16 I think some quotes are missing in the right part of the SQL clause. Which ones? :(
  6. N

    Using a listbox to delete a record

    That's the point. If I use a «query object» I can easily make it work, but not within VBA and I want the query to run within VBA. I'm really stubborn as hell... :p Didn't you tell me to remove the «##»? I did as you told me to: strSQL = "DELETE * FROM Feedbacks WHERE [Sending_Date] = " &...
  7. N

    Using a listbox to delete a record

    «General Date» (long date)
  8. N

    Using a listbox to delete a record

    «This should actually be in a New thread.. In future if there is any question, please create a new thread so many people can help you...» Sorry for the inconvenience. I'll make it right next time. ;) Well, with the code that you suggested, I get this error: «Run-time error '3705' Syntax...
  9. N

    Using a listbox to delete a record

    Hi, everyone. I'm having the same issue I'd like to delete a record from a table, based on a listbox. The goal is to select a listbox entry and delete the corresponding record in the table. The problem is that I can only delete all the records in the table or no record at all. If I use this...
Back
Top Bottom