Thanks for your help. I never really thought about using selection from selection = LstGetSelection (listP) to do a data base lookup. I just assumed I needed to search the DB in some way. I will give that a try.
Thanks again, Andy in article [EMAIL PROTECTED], Steve Mann at [EMAIL PROTECTED] wrote on 7/30/00 10:43 PM: > >> Whenever I select a >> medication then tap "Delete" I get an error about reading from low memory. > > The first question is: where does the error occur? You need to use > the symbolic debugger to answer that. > >> Also, since I can't get the above to work yet. I was wondering if any one >> could comment on my function to return the record number of the database >> record choosen from my list. Does it look like it will work? > > If your database is in the same order that you display it in the > list, you should be able to use the selection from > > selection = LstGetSelection (listP); > > to do a record lookup without any other lookup complications around. > If it's not, why not? > > Finally, in your code, you don't check for any errors at all. For instance, > > listP = GetObjectPtr(DeleteEditListList); > > What if listP is NULL? > > selection = LstGetSelection (listP); > > What if selection is -1, meaning there is no selection? > > recordHdl = DmQueryNextInCategory (gDataBase, &recordNum, theCategory); > > What if recordHdl is NULL? > > packedDrug = MemHandleLock (recordHdl); > > What if packedDrug is NULL? > > Hope that helps point you in the right direction. > > Regards, > Steve Mann -- Andy Black [EMAIL PROTECTED] Unix is user friendly. It is just picky about who its friends are. -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
