Dealing with select boxes
Dealing with select boxes
I'm trying to do something like this in a form
varTest = cboAbsenceCode.SelectedKey
I get the following error:
Conversion from type 'Byte()' to type 'String' is not valid.
How do I handle this?
Thanks,
Mat
varTest = cboAbsenceCode.SelectedKey
I get the following error:
Conversion from type 'Byte()' to type 'String' is not valid.
How do I handle this?
Thanks,
Mat
Dealing with select boxes
Hi Mat,
Please open attached report in the Demo.exe sample application.
Thank you.
Please open attached report in the Demo.exe sample application.
Thank you.
- Attachments
-
- 203.ComboboxMasterAndDetail.mrt
- (16.69 KiB) Downloaded 244 times
Dealing with select boxes
Thank you for that, but I would like to know the combo box's selected key. I seem to be able to get this if the key is a string, but if the key is an integer then I seem to have a problem.
Mat
Mat
Dealing with select boxes
Hello,
You can use following expression:
Thank you.
You can use following expression:
Code: Select all
ComboBoxControl1.Control.SelectedKey
Dealing with select boxes
if I try this:
I get this error: "error BC30456: 'SelectedKey' is not a member of 'System.Windows.Forms.ComboBox'."
If I try this:
I get this error:
Conversion from type 'Byte()' to type 'String' is not valid.
I need the key value.
Thanks,
Mat
Code: Select all
varTest = cboAbsenceCode.Control.SelectedKey
If I try this:
Code: Select all
varTest = cboAbsenceCode.SelectedKey
Conversion from type 'Byte()' to type 'String' is not valid.
I need the key value.
Thanks,
Mat
Dealing with select boxes
Hello,
Sorry corrected expression is:
Thank you.
Sorry corrected expression is:
Code: Select all
varTest = cboAbsenceCode.Control.SelectedItem
Dealing with select boxes
I know how to get the selected item. I need the selected key!!!!
Mat
Mat
Dealing with select boxes
It would seem that this works for you except for a type conversion problem. Have you tried the following? Just my two sense... I haven't really checked it out.mmurdock wrote:I'm trying to do something like this in a form
varTest = cboAbsenceCode.SelectedKey
I get the following error:
Conversion from type 'Byte()' to type 'String' is not valid.
How do I handle this?
Thanks,
Mat
Code: Select all
varTest = cboAbsenceCode.SelectedKey.ToString()
Thanks,
John Hamilton
Hamilton & Company, LLC
John Hamilton
Hamilton & Company, LLC