T
tonysegerdahl
Hi I have a projekt including "products" and "Vendors" where each
vendor got several products. I have created a form where the user can
seach for product information by typing or klicking in a dropdownlist
containing for example the different names of the vendors e.t.c. I also
created a form where the user can add new products by for example
typing the new product name in a textbox and then see if the vendor
exists in the data base by klicking at a combobox-dropdown list for
vendors. If the vendor exist and is clicked the info about "adress",
"telephonenumber" and " hompage" apears in respectivevly field in the
form. I would like to make it possible both to type new data (if vendor
does not exist in the database) or choose from the dropdown list (if
vendor allready exists in the database). Now, the problem is that when
choosing the dropdown list a errormessage apeares stating " the changes
in the table was not executed because it would doublicate index,
primarykeys or relations" but i do not want to add new data to the
table but simple state - " the vendor for this product is this one and,
keep it in the table as it is" and if not type the new vendor by hand
in the combobox window and then it would be added in the table. I have
been able to make it work without errormessages but then the info added
in the form wasn`t saved in the tables and couldn`t of course be found
when serching for it from the other form. Do you understand the
problem? what shall I do to make it work??
vendor got several products. I have created a form where the user can
seach for product information by typing or klicking in a dropdownlist
containing for example the different names of the vendors e.t.c. I also
created a form where the user can add new products by for example
typing the new product name in a textbox and then see if the vendor
exists in the data base by klicking at a combobox-dropdown list for
vendors. If the vendor exist and is clicked the info about "adress",
"telephonenumber" and " hompage" apears in respectivevly field in the
form. I would like to make it possible both to type new data (if vendor
does not exist in the database) or choose from the dropdown list (if
vendor allready exists in the database). Now, the problem is that when
choosing the dropdown list a errormessage apeares stating " the changes
in the table was not executed because it would doublicate index,
primarykeys or relations" but i do not want to add new data to the
table but simple state - " the vendor for this product is this one and,
keep it in the table as it is" and if not type the new vendor by hand
in the combobox window and then it would be added in the table. I have
been able to make it work without errormessages but then the info added
in the form wasn`t saved in the tables and couldn`t of course be found
when serching for it from the other form. Do you understand the
problem? what shall I do to make it work??