Results 1 to 4 of 4

Thread: Delete Record from table

Hybrid View

  1. #1
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Delete Record from table

    That command will delete ALL of the records where the where clause is meet. I guess I don't understand why you would need a loop? If there more detail to this problem?

    As for your side note, if they both are linked to the same table, you won't have an problem. You will, however, have a problem with asyncronization between the different forms. If one form is open and the other form deletes; the first form won't reflect the changes until it's requeried (this is a whole new beast to deal with).

    Ohh, and the syntax is:
    DoCmd.RunSQL strSQL

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    367

    Re: Delete Record from table

    Oh ok. I thought I had to loop it through each record one by one and delete them. I don't use SQL a lot and have never used it to delete so it's still new to me. I guess I'm just used to using loops to go through all the records to search for a specific record with VB 6.0.

    This program is simple. It is just a SINGLE form that the user will use to input data. They will not be able to view any other data. This SQL delete is just to be run when the user opens the program so it will delete any record that is a month old. So, I don't think I'll have any problems unless there's something else you can think of.

    Ya, sorry, forgot to add the strSQL to end of that command.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width