Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    42

    Unanswered: easy one for you

    I cannot remember for the life of me how to get the default of a combo box for a new record to be blank...can someone please jog my memory...


    thanks!

  2. #2
    Join Date
    Aug 2003
    Location
    Toronto, Canada
    Posts
    10
    I thought it should be blank by default unless you've set it to be otherwise. But if not, this is one way that works:

    In the OnCurrent event procedure of the form, use something like this:

    If Me.NewRecord Then

    myCombo = "" (or 0 depending on the data type, or the ID of a record with a NULL value if using a query as rowsource)

    End If

    Be aware though that this will change the value in the field from null to zero-length string or 0.


    Peter

  3. #3
    Join Date
    Jul 2003
    Posts
    42

    not sure if that will work

    because the combo is pulling from a different table to transfer the choice to the table for the new worksheet....its a choose a choose a requestor combo box...i dont want to add a record to that table, so I have to be careful that I have you right.

  4. #4
    Join Date
    Jul 2003
    Posts
    38
    Don't know if it works, but had an idea...
    Set the ComboBox.text value to "". That 'should not' add a new record, but leave the box blank. Tell me, if it's a really brillant idea ...

Posting Permissions

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