If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Spaces in Names

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Nov 2009
Posts: 223
Red face Spaces in Names

Quote:
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?
Reply With Quote
  #2 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 11,655
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
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?
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
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?


Quote:
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?
Reply With Quote
  #5 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 11,655
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
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?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On