Results 1 to 10 of 10
  1. #1
    djrolla is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    3

    Subform ComboBox Default Value

    I have a combo box in a subform that I can't get the default value to set.

    For Row Source, I have three list items: "Email";"Phone";"Meeting".
    Row Source Type: Value List
    Default Value: [Mode of Communication].[ItemData](0)



    Originally I set the default value to "Email" but that didn't work either. I want it to default to email. It defaults to meeting. What am I missing?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Default Value is associated with the Value Property. What you are describing is the Column Widths property. If you want all of your columns to display, Column Widths would be something like
    1.5",1.5",1.5"

    Also, you can choose which of these columns is the bound column. This will determine which column the Value property will look to. Adjusting the Bound Column to = 1 would bind the Email column. Then you could assign the value of Email to your combo to get it to default to a specific Row.

  3. #3
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    If you want your combobox to default to "Email" you need to set the Default Value property of course. And it should be the value you want it to have, no reference to the combobox again. So it should be simply "Email" (exactly as written in the record source). If the recordsource has multible columns, you need to use the value of the bound column. Be sure to set Email in quotes: "Email" so access doesn't try to evaluate it as a parameter.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by hapm View Post
    If you want your combobox to default to "Email" you need to set the Default Value property of course. And it should be the value you want it to have, no reference to the combobox again. So it should be simply "Email" (exactly as written in the record source). If the recordsource has multible columns, you need to use the value of the bound column. Be sure to set Email in quotes: "Email" so access doesn't try to evaluate it as a parameter.
    I am nopt understanding. To me, it seems the issue is the OP is trying to use the Column property of a combo to assign a Value to the combo. I do not believe this is possible. Hence, correctly set the Bound Column property and then
    Me.Combo.Value = Me!SomeOtherField

    or
    Me.Comobo,Value = "An Email Address"
    or
    Me.Combo.Value = 12

  5. #5
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    The OP is not clearly written on this point. Looks for me as a bad try to set the default value for data entry or form load. Only speculation so.

  6. #6
    djrolla is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    3
    That didn't work. It was what I had originally tried. When I go to Edit List Items under Property Sheet, I typed each item on a separate line (email is first if that matters). Default value is a drop down, and I selected Email. Then, the Default Value would have "Email" automatically filled in.

    Quote Originally Posted by hapm View Post
    If you want your combobox to default to "Email" you need to set the Default Value property of course. And it should be the value you want it to have, no reference to the combobox again. So it should be simply "Email" (exactly as written in the record source). If the recordsource has multible columns, you need to use the value of the bound column. Be sure to set Email in quotes: "Email" so access doesn't try to evaluate it as a parameter.

  7. #7
    djrolla is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    3
    From original post: "Originally I set the default value to "Email" but that didn't work either. I want it to default to email. It defaults to meeting. What am I missing?"

    Still clueless (I'm new to this, in case you haven't figured out)

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Have you considered any of my posts?

  9. #9
    atuhacek is offline New
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2014
    Location
    Michigan
    Posts
    61
    what is the controlling form? is your controlling form limiting the option? If not set the default value property =0 for your combo box.

  10. #10
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    We have to make some assumptions to help you, as your first post isn't very clear. Is the form bound to a record source? Is the combo box bound to a field? Did you add the combo box afterwards or is it a completely new form. Do you try to set the default value for a field of already existing records?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 12-10-2013, 03:15 PM
  2. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  3. Replies: 29
    Last Post: 08-16-2011, 05:52 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 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
  •  
Other Forums: Microsoft Office Forums