Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008

    Unanswered: access db help spaces between feilds

    hi, i have created a database in ms access. I have created several tables and have populated them with data. I have also created forms.

    i made the mistake of entering spaces between field names e.g Customer No, Tel No, Booking ID etc.

    i want to remove the spaaces so its CustomerNo, TelNo etc.

    but if i do this i have to removed all records, also the forms stop working and start giving paramter value errors.

    is there any way around this.


  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    Well, you could add fields with the correct names, then run queries to update the new columns with the existing column data, then you can whack the existing columns. The columns won't be in the same order, but, they'll be named properly.

    Or, Copy the existing table to a new name (backup), delete all records in the new table, rename the fields, and run a query to copy the data from the old table to the new table. Finally, after verifying that all data is correct, rename the old table to a backup name, rename the new table to the old table name, and kill the old table after you're SURE that everything is OK.

    Or, ;leave the tables alone & use square brackets around all offensive field names in VBA or forms

    i.e. [Customer No], [Tel No], [Booking ID]

    Personally, I would go with the second choice.
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

  3. #3
    Join Date
    Feb 2004
    One Flump in One Place
    Have I missed something? Why do you need to delete the data to rename a column?
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Feb 2008
    hi, yeh i used the square brackets, thanks for all your help.

Posting Permissions

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