Hi

Im devloping a form and i have used two combo boxes in it.. basically these combo boxes store numric code for them in databses[MS. ACCESS]... but i want to display relative string representation to user....i have populate items manually using collections in the propert window. but when i want to retrive these values from the database im unable to retrive value in the string format for a specific record . i dont know what property should i use to get the selected value for a specific record in the database. same problem occur for insert.. e.g for female employee i want to store 1 in database but want to female to user.... how can i do this... please help me...

thanks

Is it important that you represent female with 1? the database will accept the strings in the combo box so if the user chooses female it will appear as female in the db eliminating your problem i suppose

Yes its requirement... because i want to store numeric code for data and dont want to show it user and also want to display string representation to user and dont want to store it into database... please help me

Thanks

Hi maheen123,

if i have understood this properly, you have combo boxes with strings in them i.e. Female, Male and you want to insert a 1 if Female and a 2 if Male (for example) into the database.

if this is correct, then on the selectionchange of the combobox, read the text proprty and if Female write a 1 to the database table and a 2 if it is male (or whatever values you want to use).

i have some code for this if you require it?

This article has been dead for over six months. Start a new discussion instead.