Home All Groups Group Topic Archive Search About
Author
11 Oct 2005 10:38 AM
Damon
Hi,

I have a list in a combo box i.e. 10, 15, 20, 25.  The user can delete from
the list if they want or can add a new item into the list.  However, if the
do either of these, then the next time they log onto the database the
original list is still there, any deletions are back and any new ones added
are no longer there.  Is there a reason for this?

Appreciate the help

Damon

Author
11 Oct 2005 11:46 AM
Dave
If you add or remove something from a combo list then that is all you are
doing, if you want it added or removed from the database then you must add
or remove it from the database.
You might be able to do it with a data-bound control, but I never use them
so I can't help you there.

Dave O.

Show quoteHide quote
"Damon" <nonse***@nononsense.com> wrote in message
news:ZCM2f.15038$Nv6.9696@newsfe6-win.ntli.net...
> Hi,
>
> I have a list in a combo box i.e. 10, 15, 20, 25.  The user can delete
> from the list if they want or can add a new item into the list.  However,
> if the do either of these, then the next time they log onto the database
> the original list is still there, any deletions are back and any new ones
> added are no longer there.  Is there a reason for this?
>
> Appreciate the help
>
> Damon
>
Author
11 Oct 2005 1:49 PM
Saga
Then I assume that 10, 15, 20, 25 come from a db table?
Are these numbers unique? If so, then just before the item
is deleted get its value, build a delete SQL against the table
using the value as a search criterion and delete it from the
table and from the list. Doing so will guarantee tha the next
time the list is loaded it will not include any deleted items.

The sql could be somethign as simplae as:

strSQL = "delete from MyTable where Number=" & _
                   cboMyCombo.text

This assumes that Number is a numeric field.

Good luck!
Saga

Show quoteHide quote
"Damon" <nonse***@nononsense.com> wrote in message
news:ZCM2f.15038$Nv6.9696@newsfe6-win.ntli.net...
> Hi,
>
> I have a list in a combo box i.e. 10, 15, 20, 25.  The user can delete
> from the list if they want or can add a new item into the list.
> However, if the do either of these, then the next time they log onto
> the database the original list is still there, any deletions are back
> and any new ones added are no longer there.  Is there a reason for
> this?
>
> Appreciate the help
>
> Damon
>