Re: Error Trapping Question




"jake" <jp@xxxxxxxxxxx> wrote in message
news:%23ViGEkC1FHA.164@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I trap an error 383 for all of my comboboxes when I try to pick an item in
> the combobox (cboFluid = strFluidName) that does not exists. Is there a
> way to find out which combobox fired that error? The reason I need to
> know this is in my new app I have changed some of the data in a combobox
> which makes old files for this app not compatible. I was thinking that
> maybe the better way is to filter the file coming before loading the data
> and modifying it. Any ideas?


Maybe it's just me, but little of that made sense.

Error number 383 is "Set not supported (read-only property)". If
encountered during runtime for a combobox, the description is "Text property
is read-only", but the error number is the same. Apparently, your combobox
has a Style property set to 2 - Dropdown List.

If it were me, I'd make sure any changes are compatible with these older
versions of files. You didn't explain a lot (anything really) about these
"old files", but do you really want all users to have this "problem" when
they upgrade to a new version of your app? Apparently, you do realize this
and that's why you want to "filter the file".

But no, I know of no way to determine which combobox *raises* the error
(errors are raised, events are fired). You should be able to determine it
from your code though....even at runtime via the Name property.

I suggest you post your code so we can see exactly what you're doing.

--
Mike
Microsoft MVP Visual Basic



.



Relevant Pages

  • Re: UI Question - How would you do this?
    ... : Jeff Godfrey wrote: ... Once the app gets a single, specific "part name" from the database, it will ... Using a combobox, ... The app, finding multiple matches doesn't generate an error dialog, ...
    (comp.lang.tcl)
  • Re: Mouse not effect on ScrollBar of ComboBox
    ... This is already handled for a dialog-based app, and in any case would not be the problem. ... the styles for the ComboBox are not shown. ... Style of m_pChildDlg = CHILD (i set it in Design mode) ... 'Visible' property true. ...
    (microsoft.public.vc.mfc)
  • Clear Combobox Items
    ... Below is my code for a combobox. ... box is the application selection and the other retrieves data from the ... want to make a selection in the app combobox, ... bind the datasource and fill the dataadapter. ...
    (microsoft.public.dotnet.general)
  • Combobox datasource assignment to dataset suddenly stopped
    ... I have an existing app that fills a combobox with a list of names from ... I then had to go in to my code for the app and run it in debug mode. ... I'm wondering if this is related to the Microsoft updates I did to my ... development machine. ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • Error Trapping Question
    ... the combobox (cboFluid = strFluidName) that does not exists. ... old files for this app not compatible. ...
    (microsoft.public.vb.general.discussion)