On Tue, 21 Dec 1999, Ken Glover wrote:

> What I would do is use a table instead of a list, and store the record index
> as row ID when you load the table.  Then, when the record is selected,
> retrieve the row ID, and so on.

The list is required.  It contains the name field, of records in a
category.  The user selects the name from the list and that will then
delete the record in the database.  I just find it hard to believe that
there is not an easier way.

In my selection and use of a specific record I have to do an equally
difficult (actually, it's almost exactly the same problem) solution.

I increment through all of the records within a category and test to 
see if it is the selected item.  Far to inefficient.

I guess I need to find a solution to both.

I need, if it exists, a single function that will give me the index
of a record for the xth record in a category.  

Like I said before someone suggested that DmSeekRecordInCategory() is
the function and offset is the list (or item in category).  But the
docs say offset is "the offset from the passed record index".  That 
phrase does not translate, to me, into the xth item in the category,else
that is what it would have said.

Mike
 
> Ken
> ----- Original Message -----
> From: Michael S. Davis <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 21, 1999 8:56 AM
> Subject: Still no answer - Index of Selected item in Category
> 
> 
> >
> > I still need a solution to this problem.  I want to be able
> > to delete a record that is displayed in a list that is displayed
> > on a form.  The list contains items within a category.
> >
> > So there might be 4 items in the list because there are only
> > 4 items within a specific category.
> >
> > When I select item 3, for instance, I want to delete that item
> > from the database.  But I need the index, within the database, to do
> > that.  And the index might be 100, or 30 or who knows what.
> >
> > The only function that I see that is close is DmPositionInCategory() but
> > that appears to return the position in the list (3 in this case) and
> > not the index within the database, that is needed by DmDeleteRecord().
> >
> > Can someone explain how to get the index, needed by DmDeleteRecord()
> > when I have a subset of the database, by using a category.
> >
> >
> > Thanks
> >
> >
> >
> 
> 
> 

----------------------------------------------------
Shoot-to-Win

Protect the 2nd Amendment
----------------------------------------------------

Reply via email to