Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Posts
    14

    Unanswered: Combobox initial display value

    I have a form with a few comboboxes that have their control source as a table. I would like, when the form is initially displayed, for all the combox values to be blank so that users may change or view on the fields they want (this is a search form that generates its own query).

    I have tried setting the BeforeUpdate values in the comboboxes to "" and Null. I have tried to set the value of Forms!Search!Value to "" and Null. However, when the form is opened, values are still displayed in all fields.

    Any idea how I can get the comboboxes to be blank when the form is opened?

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    MyCombo.Value="" Try that ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Jun 2006
    Location
    MI, USA
    Posts
    14
    You could hide the original combo box and create a new one based on a query of the table the original one is for. Then when they select an option from the new combo box have it update the original with the new ones value.

    I know this works, I am just not sure if there is an easier way (like the one M Owen is suggesting)

  4. #4
    Join Date
    Jun 2006
    Posts
    14
    I tried the method Owen suggested but I couldn't get it to work. I just scratched the Combo Box idea and created Text Boxes instead. Once I figure out a solution to this, I suppose I'll implement the Combobox instead. There's got to be an easy way to do this. *shrug*

  5. #5
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by mudhoney
    I tried the method Owen suggested but I couldn't get it to work. I just scratched the Combo Box idea and created Text Boxes instead. Once I figure out a solution to this, I suppose I'll implement the Combobox instead. There's got to be an easy way to do this. *shrug*
    Question is WHERE did you put that line of code??? If you put in in either your form's Open event or Load event it should have worked unless you're doing something that you've not told us about ...
    Back to Access ... ADO is not the way to go for speed ...

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by mudhoney
    Any idea how I can get the comboboxes to be blank when the form is opened?
    Um... don't set a control source for the controls?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by pootle flump
    Um... don't set a control source for the controls?
    Poots ... That's ok. ControlSource tells what column to stick the selected value in. RowSource tells what values are available to choose from ...

    I'm thinking that mudhoney is not doing something right here ... THey need to show what is failing and where it is being called form ...
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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