Updates Access 2007

A

Abay

Hello,

I have to make updates to forms in a database not created by me, and I have
two problems with which I need help as follows:

There is a form with a key field, which will not allow me to update the
data, when I try I get a message to the effect " the changes you requested
would create a duplicate key". I have created such a form in other data
bases with no problem. I am missing something but can't see what ...

Another form in this data base shows a scroll bar across the screen in an
area which contains an array of totals. How can I see the fields behind the
scroll bars?

Any help with these problems would be most appreciated.

Abay
 
J

John_G via AccessMonster.com

Hi -

Your first problem is not directly related to the form - forms do not have
"key" fields; in fact they don't have fields at all. Forms have controls,
which display data from fields in the form's source table or query. You are
getting the error because you are either a) attempting to enter a new record
with a key value the same as one that already exists in the database, or b)
attempting to change the key value of an existing record to a value that
already exists in another record. (This is NOT a good practice, BTW - you
should not change key values). So, your problem is with the data, not the
form.

The second problem results from the form being larger than the screen. This
can happen if the form was designed on a computer with a different screen
size from the one you are using, or (more likely) the resolution on the PC
where the form was designed was higher than the resolution on the PC you are
using. You can increase the resolution of your screen using the "Display"
module in the Control Panel.

HTH

John
 
A

Abay

Many thanks John for your reply, which is much appreciated. Forgive me for
wrongly describing the situation. The form's source is a table with a key
field of Psr_id, the id of the only record in the table is "A1".

When I have the record displayed on the screen and when I try to change one
of the fields I get the error message.

I will change the resolution on the monitor at work and hopefully I will be
able to see the total fields.

Again I would appreciate your thoughts on the updating problem.

Abay


The form displays the record A1, but I cannot update it, when I change the
data I get the error msg previously described.

Thanks
 
J

John_G via AccessMonster.com

Hi -

Try opening the table itself, without using the form. Are you able to change
the data in any of the fields? Are you able to add new records to the table,
again without using the form? Try adding another record with Psr_ID = "A1" -
you should get the error message.

If you can update the existing record and add new ones, then there is a
problem with the form - is there any VBA code in it, or is it executing any
macros? It could be that the form is running code that is causing the error
in a table other than the one used as the form source.

Let us know how things go.

John


Many thanks John for your reply, which is much appreciated. Forgive me for
wrongly describing the situation. The form's source is a table with a key
field of Psr_id, the id of the only record in the table is "A1".

When I have the record displayed on the screen and when I try to change one
of the fields I get the error message.

I will change the resolution on the monitor at work and hopefully I will be
able to see the total fields.

Again I would appreciate your thoughts on the updating problem.

Abay

The form displays the record A1, but I cannot update it, when I change the
data I get the error msg previously described.

Thanks
[quoted text clipped - 43 lines]
 
A

Abay

Apologies in the delay in getting back .. can't access the news group while
at work and just got home.

Entering data into the table works fine, and also when I use generate the
form automatically ie using the Create form option. When I create the form
myself, placing the fields where I want, I have the problem, does not make
sense to me. I can also create a subform within a master form & update the
master form with no problems <sigh>

As I am running out of time I will go with the auto generated form.

Thanks so much for your help and suggestions.

Abay


John_G via AccessMonster.com said:
Hi -

Try opening the table itself, without using the form. Are you able to
change
the data in any of the fields? Are you able to add new records to the
table,
again without using the form? Try adding another record with Psr_ID =
"A1" -
you should get the error message.

If you can update the existing record and add new ones, then there is a
problem with the form - is there any VBA code in it, or is it executing
any
macros? It could be that the form is running code that is causing the
error
in a table other than the one used as the form source.

Let us know how things go.

John


Many thanks John for your reply, which is much appreciated. Forgive me
for
wrongly describing the situation. The form's source is a table with a key
field of Psr_id, the id of the only record in the table is "A1".

When I have the record displayed on the screen and when I try to change
one
of the fields I get the error message.

I will change the resolution on the monitor at work and hopefully I will
be
able to see the total fields.

Again I would appreciate your thoughts on the updating problem.

Abay

The form displays the record A1, but I cannot update it, when I change the
data I get the error msg previously described.

Thanks
[quoted text clipped - 43 lines]
 

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