Results 1 to 6 of 6

Thread: Spaces in Names

  1. #1
    Join Date
    Nov 2009
    Posts
    223

    Red face Spaces in Names

    Spaces in names are never 'OK,' just manageable, in most cases! So, change
    So if I am to rename all of my Tables, Forms, Controls, Queries and everything else in my database......

    will everything be OK if I simply click on each and "rename" it. I mean, that will take me some time, of course, but will the functionality of everything remain the same and will the coding change automatically?

    I am using Access 2010.
    What would you attempt to do if you knew you would not fail?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    12,519
    I think if you have already got a large amount of you app done then to retroispectoively 'fix' this is a waste of resources. accept it as it is, but dont' allow it to happen in future projects
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Nov 2009
    Posts
    223
    Healdem. Thanks for the advice. This will probably be my only major database. Now I can't sleep unless every name has the spaces removed. I have copied my databse and am trying to remove the spaces as we speak. All OK so far aprt from some subforms, but | expect other complications along the way.
    What would you attempt to do if you knew you would not fail?

  4. #4
    Join Date
    Nov 2009
    Posts
    223
    I have taken the spaces from all my Forms.
    But when i click on the Command Button to go to the Owner Form, it says that it does not exist. Used to be "Owner Form" now it is "OwnerForm".
    It seems the code in the Event Procedure did not update when i changed the name of
    the Form. So i would have to recreate all the Command Buttons again?
    Do you think I can expect many other things I will need to re-create?


    Private Sub Goto_Owner_Form_Click()
    On Error GoTo Err_Goto_Owner_Form_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Owner Form"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Goto_Owner_Form_Click:
    Exit Sub

    Err_Goto_Owner_Form_Click:
    MsgBox Err.Description
    Resume Exit_Goto_Owner_Form_Click
    What would you attempt to do if you knew you would not fail?

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    12,519
    no you dont' need to recrearte every control, but you do need to be consistent

    ferinstnace the code you have their refers to
    stDocName = "Owner Form"
    that should be the same as the form's name which I thinbk you have now named OwnerForm
    stDocName = "OwnerForm"

    if you rename the controls, then you will need to make certain the code fragments are referred to in the new names event handlers...

    its a PITA, and thats why my advice was not to bother, unless you have to....
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Nov 2009
    Posts
    223
    Yup, its a PITA.

    But I have spent all day removing the spaces. I think I have nearly done...apart from getting the subforms to change when another Control changes. Work in progress...
    What would you attempt to do if you knew you would not fail?

Posting Permissions

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