you can loop through fields for example:
dim fld as dao.field
for each fld in rst.fields
if fld.name=strNameLookingFor then
'field exists!
exit for
end if
next fld
rst - is a recordset, you can also use tabledef
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
"Ray Mead" <(E-Mail Removed)> wrote in message
news:64605EBC-2A13-49AE-BF90-(E-Mail Removed)...
>I found some code to delete specific fields. This works great except if
>one
> of the fields is deleted manually. This may happen periodically. How do
> I
> check to see if the field exists first, if it does not, then I want to
> delete
> all the fields except the ones that don't exist.
>
>
>
> "Ray Mead" wrote:
>
>> How do I delete fields OriginalLnm & OriginalFnm from tblTest? I want to
>> first check to see if those fields exists. If they do, then delete the
>> fields.