Combo box problem

totti

Member
Joined
Sep 22, 2005
Messages
7
Programming Experience
1-3
Hi

I want to use combo box from material type.
When I want to add it to inventory table. It error because this item not corresponding item. It seems to be miss "Material" field but I check it correctly.

Ex.
rs.field("MaterialID").value = GetMaterialID(cboMaterialID.text)

function GetMaterialID(arg) will return correctly result that is integer ID.

Besides, if i change "GetMaterialID(cboMaterialID.text)" to number (ex. 1 0r 2), it can add to database.

Can you suggest me?

Thanks...
 
Hey totti,

I have no idea if this will help, but I do remember having a similar problem with ComboBox a while back:

Try cboMaterial.SelectedItem Instead of cboMaterial.Text.

I'll check this out later, I'm probably wrong.. :)
 
I still got problem.

When I use cboProductTypeID.SelectedValue and cick "add" button, it will add to DB. But it display "Object reference not set to an instance of an object".

Can you help me? :(
 
Back
Top