Acess2007 Field name change prompts Enter Parameter Value in Form

B

Bob H

I have changed some field names in a table; just closed the gaps, and
although they reflect in the query as well as in the the control sources
of the form, when I open the form I am asked to Enter a Parameter value
for the first field I changed.

Is there a way round this to stop that happening, and just open the form
as before?

Thanks
 
K

Ken Snell \(MVP\)

Check the form's RecordSource and the textboxes' ControlSource and the
comboboxes' RowSource and the listboxes' RowSource properties... likely one
or more of them contain a reference to the previous name of the fields.
 
B

Bob H

The form's Recorsource is from the Query which is updated by the Perform
Name Auto correct option which I ticked in Access options. So when I
changed the name in the table the name in the query was automatically
changed. The Textbox's Controlsource name is the same as in the query
and table.
The name giving the problem in the form is not related or the same to
anything I have in a combobox or listbox.
I guess I'll just have to leave the name as it was before.

Thanks
 
K

Ken Snell \(MVP\)

Are you opening the form manually? If you're opening it by macro or code
(OpenForm), does the Where argument still contain the previous field's name?

Somewhere in the form or in your opening of the form, there is a reference
to the previous field name.
 
B

Bob H

I am opening the form manually. Its its strange why its happening, as
I've been doing some experiments to find the source of the problem.
I selected a different controlsource for the said textbox, but the error
was still there. I also changed the field name in the query to another
which was already there, but the error still remained, and the only way
I know so far to cure it is to rename the said name to what it was before.
So, as you rightly say, somewhere there is a reference to the old name,
but I'm blowed if I can find it yet.

Thanks
 
B

Bob H

Looking more closely, the error is telling me its coming from the table!
Electrical items Table.Asset No. Asset No is the one I am trying to
change to AssetNo in the table.
In the said table I have in the Asset No field named the caption for it
as 'AssetNo', which is reflected in the query. Now as the form gets the
infrmation from teh query, why doesn't it get the new name without
asking me for a parameter, as non of the other new names do?

Thanks
 
B

Bob H

Ok, I have found the source of the problem!
It was the actual name of the text box which was called Asset No, whilst
everthing else was called or named AssetNo.

Thanks
 

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