List forms to form record

Sgte
2StarLounger
Posts: 164
Joined: 10 Feb 2010, 12:53

List forms to form record

Post by Sgte »

In Access 2003 (pre windows 7) I could have a form displaying a number of records in a list, for instance the field ID, Client code, Client name. Then there was a command button, so coded that upon clicking it the underlying data was displayed in a form. The field that linked the two forms was client code - a unique field. Due, it seems, to a change in security, I now cannot use the command button to navigate to the underlying form as the error message states that this would cause a duplicate value in the indexed field. I am not trying to alter the data at, merely move from one form to another! Any help with this issue please?

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: List forms to form record

Post by HansV »

Hi Stephen,

Welcome to Eileen's Lounge!

The error message does not appear to be related to security. It seems that Access tries to create a new record instead of displaying an existing record. Has the Data Entry property of the form being opened been set to Yes by accident?
Best wishes,
Hans

Sgte
2StarLounger
Posts: 164
Joined: 10 Feb 2010, 12:53

Re: List forms to form record

Post by Sgte »

OK, thanks Hans. I'll check on that but if I set the data entry property to No - then I won't be able to edit the underlying data? If that is the case, then there is no point to forms!

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: List forms to form record

Post by HansV »

No, if Data Entry is set to Yes, the user can only add new records, not view existing records.
If Data Entry is set to No, the user can both add new records and view existing records.
(The name 'Data Entry' is confusing, I admit)
Best wishes,
Hans