Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Default blank field on form (2000)

    We have a form that includes a record selector box. You enter a record number into the box, press [Enter], and the other fields on the form display information from that record. When the user hits [Enter] after keying in new information in the last field, the cursor returns to the record selector box. That's good, but I need that box to go empty when the cursor returns. How do I do that?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Default blank field on form (2000)

    You could use the OnGotFocus event of the combo box to clear it:

    Private Sub cboSelect_GotFocus()
    cboSelect = Null
    End Sub

    Replace cboSelect by the name of your combo box.
    This code will clear the combo box all the time (without impairing its selector capacity)

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Default blank field on form (2000)

    I knew it had to be something short and sweet like that. Thank you, Hans!

Posting Permissions

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