Click here to Skip to main content
15,906,467 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..


i am getting following error:

Run_time-error 383 'Text property is read only'

i am working on vb project (vb6.0).

cmbTaxClassID.Text = tsiNVL(rsVoucher!AcTr_TCLsId)

Please anybody can help me.
Posted
Comments
E.F. Nijboer 2-Nov-12 7:18am    
This error message is actually very clear. What don't you understand about it?
PRAKASH_N 2-Nov-12 7:27am    
I m not good in vb. I know C# but vb i m getting difficulty. .

Do i need to change the property of a Textbox?
MT_ 2-Nov-12 8:14am    
Did you get any help from solution i said in below.

I suspect the code you are trying is not correct. The control cmbTaxClassID is not a textbox but it is a combo-box.
I remember reading somewhere that if you set style of combo-box to Dropdown List, it behaves completely different

Note: I am not a VB programmer, this is just vague memory.

Thanks
Milind
 
Share this answer
 
I feel you are using Combobox with list so its Text has read property.
Either you change the combo property or find the required TEXT in the combobox list and assign
Combobox.selectedIndex= ItemIndex
 
Share this answer
 
A couple different ways to handle this.
VB
cmbTaxClassID.SelectedValue = tsiNVL(rsVoucher!AcTr_TCLsId)
-- or
cmbTaxClassID.SelectedText = tsiNVL(rsVoucher!AcTr_TCLsId)

You could also loop through each item in the control, compare the text to your value and set that item as selected if found.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900