Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

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]
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page