Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    34

    Unanswered: Access Combobox: The value entered isn't valid for this field

    I have the following situation:
    * 2 comboboxes on a form (unbound)
    * After selecting a value from the first combobox the rowsource is updated of the second and the first value selected (if the query returns at least 1 result)

    The problem
    * After selecting a new value in combobox 1 I get the error "value entered is invalid for this field" sometimes (combobox 2)

    This has to do with Access that somehow sets the input type to "numeric" or "date" for combobox 2 somehow apparently if a query returns numeric or date values. If the comboboxes recordsource is then updated to a recordsource that returns alphanumeric values this results in this error.

    > Is there any way to have access ignore "invalid data" since i just want to be able to select any value in the second combobox.

    Settings of combobox 2:
    * Format: @;"Unknown"

    Have tried:
    * On open form set rowsource of combobox 2 to a query only returning alphanumeric values and setting the value to the first returned value
    * Set the rowsource of combobox 2 to a query only returning alphanumeric values and setting the value to the first returned value
    * Have a default value that is alphanumric

    None of them worked.

    Thanks anyone, i appreciate any help getting rid of this irritating bug
    Last edited by irenicuz; 11-21-06 at 07:36.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Perhaps the problem lay with Combo1.

    Make sure it's not bound to a table field.

    .
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  3. #3
    Join Date
    Feb 2004
    Posts
    34
    both comboboxes are NOT bound to a field

    Edit: I have now updated the form to use 2 comboboxes, 1 for alphanumeric values and 1 for the other datatypes. This does work fine, though there must be some other solution for this.
    Last edited by irenicuz; 11-21-06 at 07:51.

  4. #4
    Join Date
    Feb 2004
    Posts
    34
    haven't been looking here for this topic for some time now since i now have a workaround (see above). I am still interested in a proper solution however.

    To Sam:

    1) Clearing the formatting does not work, have tried that
    2) Yes I am setting the rowsource of the second and the requery the combobox. You can see the values in the list, though after selecting a value you will get the error described (but only if the combobox is somehow locked in a state where it only accepts numeric or date values, i.e. meaning the previous rowsource returned numeric or date values).

  5. #5
    Join Date
    Feb 2004
    Posts
    34
    double post (internet is messed up here)

  6. #6
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Don't have a clue. Anyone?

    Sam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •