Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2010
    Posts
    10

    Unanswered: Append query changes my field names randomly

    I have an append querey that I built with the Access Query Builder. I selected the field name from the drop down list that the builder provides along the "Append To:" row, in order to be sure that I did not mis-spell the field name. When I toggle to the datasheet view, and then return to the design view, the filed names have changed. This is happening for three of my field names out of the 17 total field names usde in this query.

    The field names are outside of my control in order to maintain easy importing functions from other datatables outside this database, so I must use these field names.

    Actual field names:

    Length (P)
    Width (P)
    Height (P)

    Altered field names:

    Length(P)
    Width(P)
    Height(P)

    (the space dissapears before the parenthesis)

    I tried using [Brackets] around the entire name, but Access automatically drops the brackets after I save the query, close it, and reopen it.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I can replicate this. I can't help though - like (pretty well) everyone who has designed databases and written code for some time I allow no spaces in any names. As such it is isn't something I've ever encountered in the field.
    There isn't much I can suggest other than to get control of those functions. You shouldn't have to, but sometimes circumstances force your hand.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Aug 2010
    Posts
    10
    I did find a work around for this. As long as I view the Query in the SQL view, the field names do not change. However, once I view the query in the Access design view, then it changes the field names. So for now, I will only look at the query design in the SQL view. Whatever????

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    just wondering if those are reserved words in access/JET
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    It looks to me like Access is interpreting your fieldnames as functions. If you are not familiar with a function, the function name is followed by '(' and a list of parameters and a ')'. If you are typing code in the VB editor the editor will remove spaces after the name of the function and before the parameters.

    If you have () in your field names, I would STRONGLY recommend you remove them. You may run into more weird behavior in other parts of Access. I think the only special character that is OK to use in a field name is the underscore _.

  6. #6
    Join Date
    Aug 2010
    Posts
    10

    Possible Function Names

    Thanks, I don't know how to find out if you are right about the function name, but you are right, I need to get away from using any () in field names. Thanks.

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    And spaces.
    Use alphanumerics and underscores only and avoid any of these:
    List of reserved words in Access 2002 and in later versions of Access
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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