Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default value in dropdown (2000)

    Hi,

    I am using a drop down system and would like a default value to appear in this drop down.
    I have tried to do this but cannot work out how it is done.
    see attachment.

    Justin.
    Attached Images Attached Images

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

    Re: Default value in dropdown (2000)

    You should be able to set the Default Value property of the combo box in the Data tab of the Properties window, but what exactly to put there depends on other properties of the combo box. If the Column Count property (in the Format tab of Properties) is 1, you should be able to enter the value you want to see in Default Value. If, however, Column Count is greater than 1, and the Column Widths property tells you that the first column has width 0, you should not enter the value you want to see, but the corresponding value of the hidden first column.

    If you need more assistance, please provide the following information for the combo box (not as a screenshot, but as text in a reply):
    From the Format tab:
    - Column Count
    - Column Widths
    From the Data tab:
    - Row Source Type
    - Row Source
    - Bound Column

  3. #3
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default value in dropdown (2000)

    This may not work in every circumstance but it works for me... In the combo box properties, data tab, default value, use the following:

    [ComboBoxName].[itemdata](XXX)

    where Comboboxname = the name of your combox and XXX = the row in your lookup table (assuming your combo box is based on a table or query) that contains your desired value. In determing the row, remember that it starts with zero.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Default value in dropdown (2000)

    It only starts at zero if you have column heads turned off. If they are turned on, the item count should start at 1 or you will return the column header.
    Charlotte

  5. #5
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default value in dropdown (2000)

    That works great. Thanks.

    Justin.

  6. #6
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default value in dropdown (2000)

    I have resolved this problem.
    See thread from Don Sadler

    Regards
    Justin.

  7. #7
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default value in dropdown (2000)

    I appear to be getting an error now.
    Any ideas as to what is causing this?
    see attahment.

    Justin.
    Attached Images Attached Images

  8. #8
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default value in dropdown (2000)

    When clicking on the dropdown list the default value does not appear to be showing , any ideas as to why not?
    Information you required.

    From the Format tab:
    - Column Count: 0
    - Column Widths: 2.54 cm
    From the Data tab:
    - Row Source Type: Table/Query
    - Row Source: SELECT [Names Docs Review].[names] FROM [Names Docs Review];
    - Bound Column: 1

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

    Re: Default value in dropdown (2000)

    - Column Count: 0

    That is very strange, Column Count can only be a value in the range 1 through 255. Try setting it to 1, then enter the Default Value property again.

    Note: Default Value only works for new records, not for existing records.

  10. #10
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default value in dropdown (2000)

    I have changed this but now l get an error.

    Justin
    Attached Images Attached Images

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

    Re: Default value in dropdown (2000)

    Could you post a stripped down version of your database? You know the recipe by now. Please remove superfluous items, but don't strip away so much that the combo box doesn't work any more.

  12. #12
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default value in dropdown (2000)

    I would like the default value to be "JACKSON Steve" on the dropdown.
    As this choice is very common.

    Regards
    Justin.
    Attached Files Attached Files

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

    Re: Default value in dropdown (2000)

    You have set the Default Value property to

    [Current Owner].[itemdata]("JACKSON Steve")

    This is meaningless (and not what Don Sadler intended.) Since you want a fixed value, you should set the Default Value simply to

    "JACKSON Steve"

    (including the quotes; if you omit them, Access will add them again.)

  14. #14
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Portland, Oregon
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default value in dropdown (2000)

    I have been working on the same type of problem. However, I'd like my dropdown box to have a default value based on the value of another field (whether or not that field is "null"). example: IF txt2DefFullName is null then cboRespParty = "1Defendant". AND I'd like this happen the the click event of a check box.
    I've tried several things but no "hits" so far.
    Charlotte

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

    Re: Default value in dropdown (2000)

    Let's try to get the terminology straight. The Default Value property of a field determines the value this field will have in a new record, before data have been entered in that record. I'm not sure that is what you mean by "default value". If txtDefFullName is bound to a field, it makes no sense to have the default value of another field depend on it. I also don't understand what the check box has to do with it.

Page 1 of 2 12 LastLast

Posting Permissions

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