Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Help....

Discussion in 'Information Technology' started by James, Jul 28, 2006.

Tags:
  1. James

    James
    Expand Collapse
    Guest

    I'm trying to delete records from a table. I have a combo box that
    lists all the current records and I want to be able to select the
    record and then have the delete key delete that record. I can get the
    delete key to just delete the first record in the table but that
    doesn't help me.... any tips?
     
  2. Loading...


  3. Graham Mandeno

    Graham Mandeno
    Expand Collapse
    Guest

    Hi James

    So how are you trying to do it so far? Or do we have to guess?

    You might try something like this:

    sSql = "Delete from [YourTable] where [YourPrimaryKey]=" & [YourCombo]
    CurrentDb.Execute sSql, dbFailOnError

    --
    Good Luck!

    Graham Mandeno [Access MVP]
    Auckland, New Zealand

    "James" <jamesburkett@gmail.com> wrote in message
    news:1150234310.495246.100130@p79g2000cwp.googlegroups.com...
    > I'm trying to delete records from a table. I have a combo box that
    > lists all the current records and I want to be able to select the
    > record and then have the delete key delete that record. I can get the
    > delete key to just delete the first record in the table but that
    > doesn't help me.... any tips?
    >
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On 13 Jun 2006 14:31:50 -0700, "James" <jamesburkett@gmail.com> wrote:

    >I'm trying to delete records from a table. I have a combo box that
    >lists all the current records and I want to be able to select the
    >record and then have the delete key delete that record. I can get the
    >delete key to just delete the first record in the table but that
    >doesn't help me.... any tips?


    My answer posted minutes before this reposted question was
    unacceptable? Graham just made exactly the same suggestion.

    John W. Vinson[MVP]
     
  5. Graham Mandeno

    Graham Mandeno
    Expand Collapse
    Guest

    Ha! Sorry, John - I didn't notice that other thread or I wouldn't have
    replied.

    Cheers,
    Graham

    "John Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
    news:slou82h3015pj9g6b81ob8jbhr4isqmn52@4ax.com...
    > On 13 Jun 2006 14:31:50 -0700, "James" <jamesburkett@gmail.com> wrote:
    >
    >>I'm trying to delete records from a table. I have a combo box that
    >>lists all the current records and I want to be able to select the
    >>record and then have the delete key delete that record. I can get the
    >>delete key to just delete the first record in the table but that
    >>doesn't help me.... any tips?

    >
    > My answer posted minutes before this reposted question was
    > unacceptable? Graham just made exactly the same suggestion.
    >
    > John W. Vinson[MVP]
     
  6. James

    James
    Expand Collapse
    Guest

    Graham... if you get a chance, I posted under "how to delete record
    from cbo" with an error msg I get when I code it the way you suggested,
    I'd appreciate it if you could try to help me out along with john... it
    means a lot, thanks!

    Graham Mandeno wrote:
    > Ha! Sorry, John - I didn't notice that other thread or I wouldn't have
    > replied.
    >
    > Cheers,
    > Graham
    >
    > "John Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
    > news:slou82h3015pj9g6b81ob8jbhr4isqmn52@4ax.com...
    > > On 13 Jun 2006 14:31:50 -0700, "James" <jamesburkett@gmail.com> wrote:
    > >
    > >>I'm trying to delete records from a table. I have a combo box that
    > >>lists all the current records and I want to be able to select the
    > >>record and then have the delete key delete that record. I can get the
    > >>delete key to just delete the first record in the table but that
    > >>doesn't help me.... any tips?

    > >
    > > My answer posted minutes before this reposted question was
    > > unacceptable? Graham just made exactly the same suggestion.
    > >
    > > John W. Vinson[MVP]
     

Share This Page