PC Review


Reply
Thread Tools Rate Thread

delete field

 
 
=?Utf-8?B?UmF5IE1lYWQ=?=
Guest
Posts: n/a
 
      30th Jun 2005
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.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UmF5IE1lYWQ=?=
Guest
Posts: n/a
 
      30th Jun 2005
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.

 
Reply With Quote
 
Alex Dybenko
Guest
Posts: n/a
 
      30th Jun 2005
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.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete a field value? lvensen Microsoft Access 2 1st Oct 2009 07:27 PM
How do I delete data in a field in Access but not delete the whol. =?Utf-8?B?TGVhbm5l?= Microsoft Access Queries 1 5th Mar 2005 10:27 PM
Can't Delete Field Kevin Sprinkel Microsoft Access 4 20th Jan 2004 01:55 PM
Delete all records matching a field except for one based on an includeddate field naniboujou Microsoft Access Queries 3 13th Dec 2003 03:31 AM
Can't delete a field Tony Williams Microsoft Access Forms 1 1st Oct 2003 01:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:32 PM.