Results 1 to 6 of 6
  1. #1
    samsquared is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    May 2021
    Location
    St. Augustine, FL
    Posts
    20

    How do I select a particular combobox item to appear in a form being opened from another form?

    I have a database that contains these 2 forms:



    • Property: Purchase cost, HVAC info, insurance info, etc.
    • Room_Dimensions: Room dimensions by property

    They each have an unbound combo box with ID (hidden) and an address (visible) to select the property for which data should be shown. On the Property form there's a command button that will open the Room Dimensions form and display data for the selected property using OpenForm and the appropriate property ID in the where condition. That's all working properly but what I'd like is to have the combobox on Room Dimensions show the name of the property instead of being blank. I have the Property ID but don't know how to preselect that particular property in the combobox.


    I suppose I could put the room dimensions info into a subform on the property form, but this info is rarely used and I'd just as soon it be separate.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try in Room_Dimensions Open or Load or Current event.

    Me.comboxname = Me!PropertyID
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Assuming the combo box returns 2 fields properttyPk and property name in that order, set the column count to 2, bound column to 1, and column widths to 0 and the control source to the name of your propertyFk

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Why not use a subform for dimensions? Then the property details are visible above the subform and you don't have to get them into a separate form.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    CJ, OP said control is UNBOUND and purpose is to select property to filter form. Controls used to select/enter filter criteria should not be BOUND.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    samsquared is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    May 2021
    Location
    St. Augustine, FL
    Posts
    20
    June7, thank you for the quick reply, - that did it! I guess I thought it was going to be more involved, so doing that did not occur to me.

    Thanks to all who tried to help.

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

Similar Threads

  1. Replies: 5
    Last Post: 01-11-2022, 09:32 PM
  2. select combobox item
    By civl_eng in forum Access
    Replies: 3
    Last Post: 05-15-2018, 02:49 AM
  3. Replies: 5
    Last Post: 10-18-2016, 06:00 AM
  4. Replies: 9
    Last Post: 07-03-2015, 03:25 PM
  5. Replies: 1
    Last Post: 09-27-2013, 04:07 PM

Tags for this Thread

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