Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    rename field by code (Access 2000)

    In my table Preisliste,imported from an excel worksheet, I need to carry out the following steps

    1.To rename the first field to to “code” regardless of the fieldname, because it may be different in different cases
    2. To delete all the rows in the field code that do not contain numbers, for example everything above 10470 in my case

    Can you help me ? I am sending a cut out example
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: rename field by code (Access 2000)

    1) CurrentDb.TableDefs("Preislliste").Fields(0).Name = "Code"

    2) You can create a Delete query to take care of this, and run it when needed. If you want to do this in code, you can use

    CurrentDb.Execute "DELETE FROM Preislliste WHERE IsNumeric(<!t>[Code])=False"

  3. #3
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: rename field by code (Access 2000)

    Thank you so much !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •