Rename form ?

S

SpookiePower

I have made a form nd gave it the name slukkere.

I now want to give it a new name, so I right-clicked on it,
pick rename and gave it a new name. But I just
found out, that renaming it, is only changing the caption
of the form, not the name. It still have the name I gave
it when I created the form.

How can I give it a new name ?
 
R

Rick B

To change what displays in the top of the form when you open it, take a look
at the form's properties. I think the "caption" might be wrong.
 
S

SpookiePower

I think what I said in the beginnig of this tread might be wrong.

But I'm a bit confusing.

I have this VBA code -

Me.slukkere_Subform.Enabled = True

But I did not like the name of the form, so I renamed
it to frmsubSluk. But the VBA code will only run
if I use the old name and not if I use Me.frmsubSluk.Enabled......

This is confusing me a lot.
 
P

PJones

The form caption takes the form name by default.

If you have referenced a form name in a sql query, then you will have to
make sure to edit the SQL query to update the form name.
 
D

Douglas J Steele

The name of the form you're using as a subform is actually irrelevant to
what you're trying to do.

When you add a form as a subform to your main form, a subform container is
created. If you add the form by dragging the one form onto the other, the
subform container is named the same as the form you dropped on the form (The
alternative is to select the subform container from the toolbox and add it
to the main form, in which case your subform container will be named
something like Child1)

In the statement

Me.slukkere_Subform.Enabled = True

slukkere_Subform actually refers to the subform container. Renaming the form
you're using as a subform won't have renamed that container.
 
B

betwalk

When you rename an object or control in Access, you then have to chase
down all references to that object and change them to reflect the new
name. In Access 2003, using the dependencies tool can help you with
this job. There are also 3rd party Find and Replace utilities that can
help you do this job thoroughly. Otherwise, it's easy to miss a
detail.

hth- Betsy
 
S

SpookiePower

Thanks for your help.

I can see now that it is important to give the different things in
access the right name from the beginning.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top