dcsimg
Results 1 to 5 of 5

Thread: [RESOLVED] going back to default on combobox view

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2018
    Posts
    54

    Resolved [RESOLVED] going back to default on combobox view

    i have a combo box that i made for bringing up records on a form but i wold like the combo box to be cleared after the form has been populated any ideas on how this would be done?
    Name:  hhhjhj.jpg
Views: 133
Size:  7.9 KB
    Name:  hgk.jpg
Views: 143
Size:  26.3 KB
    Code:
     DoCmd.OpenForm "Order Master", acNormal, , "[Order Number] = '" & Me![Combo970] & "'"
            Me.Order_Complete.Value = False
            Me.Refresh

  2. #2
    Fanatic Member
    Join Date
    Dec 2014
    Location
    VB6 dinosaur land
    Posts
    878

    Re: going back to default on combobox view

    If by "cleared" you mean just not showing a value vs not having any values to select from anymore, then set the SelectedIndex property to -1.
    Code:
    ComboBox1.SelectedIndex = -1
    However, this looks like an Access form vs .Net so not certain that works.

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2018
    Posts
    54

    Re: going back to default on combobox view

    i gave this a try and had no luck

  4. #4
    Frenzied Member
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    1,176

    Re: going back to default on combobox view


  5. #5

    Thread Starter
    Member
    Join Date
    Feb 2018
    Posts
    54

    Re: going back to default on combobox view

    thank you for the advice with a little research with google i found something that worked:
    Me![Combo970]= Null
    Last edited by cubsm22p; Mar 14th, 2018 at 01:27 PM.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width