>>>Hi Grady,
>>>
>>>It's hard to tell from your code which are memory variables and which are table fields. You should either use 'm.' prefix or Hungarian notation for memore variables to make code readable and avoid conflict between memory variables and table fields.
>>>
>>>>I have a file that has map coords in it. It loads and places shapes on a map at the coords in the table. All works fine so far.
>>>>But I need to remove some of the shapes if the date in the table is less than the date calculated in this little routine. When the code runs, it removes all the shape and leaves none when it should be leaving shapes > Dday behind for viewing.
>>>>
>>
>>* I'm assuming I can use m. in front of a date
>>* DateNumber is an integer 7,14,21, or 28
>>Dday = (Date() - m.nDateNumber)
>>Scan
>> If localcrime1.crimedate < m.Dday
>> ShapeID = localcrime1.shapename
>> Thisform.RemoveObject(m.ShapeID)
>> Endif
>>Endscan
>>
>
>I removed unneeded dots, though some people like to leave them.
>
>Anyway, the code looks fine to me, can you trace it to see, what it's doing? I think you have data problem, not a bug in this little piece of code.
Thanks for the clue. BTW the Shapename field contains a sys(2015) value
I ain't skeert of nuttin eh?
Yikes! What was that?