Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Posts
    22

    Unanswered: CLEAR fieldson form!!

    I am trying to set up my form so that when a user is done searchng for certain products the combo boxes will clear or go back to blank...currently the user has to go and delete the text from the box.

    please help!

  2. #2
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    combobox.recordsource = ""
    combobox.requery

  3. #3
    Join Date
    Aug 2003
    Posts
    14

    Requery??

    How does this requery work, I have a form that my sql refers to to search the data that i specify in the text fields, but i need to clear this search form every time i open and close it. When i open the form it contains the info from the last search. I know requery is what i need to use but does that go on my sql or on the VB on my close button?

    Anyone know how to implement this?

    Cheers

    D

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    axsprog's .recordsource = "" is fine if you are planning to close the form and reopen it before trying to use the combo again.

    if you just want to clear the combo but keep it alive for a possible second selection, try
    combobox.value = null

    neither of these code snippets go in SQL. they go in whatever event you want to use to trigger the clear.

    my .value = null could go in form_load or your close button_click

    axsprog's .recordsource = "" can only go in close button_click

    (...close button_click or form_close or form_unload etc)

    izy

  5. #5
    Join Date
    Aug 2003
    Posts
    14

    Thanks

    Thanks for clarifying all that Izy much appreciated.

    D

Posting Permissions

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