Comobobox and field population

DevAccess

Registered User.
Local time
Today, 15:53
Joined
Jun 27, 2016
Messages
321
Hello,

I have combobox with the below choice
here ---> refer to column since HTML would wrap the text so I am putting --> to differentiate column in combobox. basically there are four columns.
Customer ID ---> Value --> Name --> Address
1 ----> Test1---> Retain Inc --> Newyowrk
2 ---- > Test3 --> Data inc --> Indiana
1 --> Test0--> Hollmark inc --> Plano
3 --> Test5--> DataBase inc --> Australia
2 --> Test6--> Total inc --> Russia

Now this combobox is based on query from one table which store and update as we are saving the record, and when user selects the value from above combobox it populates the value of that record into the form field with other information for the selected record.

Now my concern is that when I select similar customer ID for example customer id 1 it always gives test1, retain inc and newwork and populates other information but when I select customer ID 1 which is belongs to Test0 and Hollmark Inc , I can not see record set is being updated means the form data is being update for similar records.

the form field is bound to same query which is being used in combobox

Please assist.
 
What exactly is the "unique" field in you record?
Not really understanding the post????

Select * from table where CustomeriD = 1

should give/return

1 ----> Test1---> Retain Inc --> Newyowrk
1 --> Test0--> Hollmark inc --> Plano
 
What exactly is the "unique" field in you record?
Not really understanding the post????

Select * from table where CustomeriD = 1

should give/return

1 ----> Test1---> Retain Inc --> Newyowrk
1 --> Test0--> Hollmark inc --> Plano

It is CustomerId as primary key in the table.
 
Then something is confusing.
How can you have 2 Customer records with CustomerID = 1?

May be you should post a copy of the database--remove confidential info first.
 
Then something is confusing.
How can you have 2 Customer records with CustomerID = 1?

May be you should post a copy of the database--remove confidential info first.

One customer can have many values isnt ?

like one customer can have multiple address in multiple countries.

I am sorry it would be difficult to upload the database... I am really sorry for this.
 
In post #3 you said
It is CustomerId as primary key in the table.

The primary key is the field whose value is unique for records in the given table.
You can not have duplicate PK values in a table.

Thus the confusion?????

There must be more to your situation than you have told us.
 
In post #3 you said


The primary key is the field whose value is unique for records in the given table.
You can not have duplicate PK values in a table.

Thus the confusion?????

There must be more to your situation than you have told us.

Thanks but we have table structure wherin we have same value for customer Id field and that is one of the primary key among others.
 
Thanks but we have table structure wherin we have same value for customer Id field and that is one of the primary key among others.

Really???

DevAccess, With over 150 posts the definition of Primary Key should not be in doubt. I don't mean to be difficult, but you can not have 2 primary keys in a table. You can have a compound primary key (composed of 2 or more fields) but the value will be unique for each record in the table.

Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom