>I have a DBF named Agency
>In the Agency DBF...
>I have a field named Agency
>I have an index named Agency
>
>After I SCATTER MEMVAR MEMO and THISFORM.Refresh
>I get the error Data Type Mismatch.
>
>The Locals Window shows Agency as OBJECT
>The Locals Window does not show Agency as CHARACTER FIELD.
>That causes the error Data Type Mismatch. I proved this when
>I renamed the Agency field to Agency _ID and the error disappeared.
>
>Is there any way I can use the same name for a DBF and a field and an index? I know it's not good practice or it may be illegal, but so many applications use the Agency DBF that changing the field name would cause an avalanche of changes in other projects and forms.
>
>Any way to get this to work without changing the field name? Thanks for your ideas?
My PK field often has the same name as the table, and I never got any problems. Nor do I think it is a bad practice to use the same name for a table, its PK field, and the corresponding index.
Did you try SCATTER ... NAME? This will create an object, with the field values as properties (named after the fields).
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)