Results 1 to 6 of 6
  1. #1
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246

    Combo Box based on query. Cannot type in combo box to jump to person.

    Access 2007, SQL Server 2008, In development not production,

    Not sure which Forum is best so I posted here.

    Problem:



    I am joining an Entity (person or corporation) to a piece of Real Property using a join table.

    dbo_Property Property Table
    dbo_Entity Person or Corporation Table
    dbo_PropertyEntity Table Joins dbo_Property to dbo_Entity

    The following query runs when you click on the down arrow of a combo box located on the Property Form. The query runs fine and selects the correct information for you to choose from. The user can see the Entity Name and Address to verify they are selecting the correct Entity. When they select an Entity the Combo box places the EntityID PK into the join table just fine. However if I just place the cursor in the combo field and try to type a user name it won't jump to the user. I must scroll down to find the person and there may be thousands. The problem is not the query. The question is when you populate a combo box from a query, does it somehow disable the type and jump process?

    Code:
    SELECT dbo_Entity.EntityID, IIf([dbo_Entity]![LastName]<>"",[dbo_Entity]![LastName] & ", " & [dbo_Entity]![FirstName],[dbo_Entity]![NonPersonEntity]) AS Name, [dbo_EntityAddress]![EAddress1] & ", " & [dbo_EntityAddress]![EAddress2] & ", " & [dbo_EntityAddress]![ECity] & ", " & [dbo_EntityAddress]![EState] & ", " & [dbo_EntityAddress]![EZip] & ", " & [dbo_EntityAddress]![EAddressType] & ", " & [dbo_EntityComm]![EPhone] AS Address
    FROM (dbo_Entity INNER JOIN dbo_EntityAddress ON dbo_Entity.EntityID = dbo_EntityAddress.Entity_EntityID) INNER JOIN dbo_EntityComm ON dbo_Entity.EntityID = dbo_EntityComm.Entity_EntityID;
    I can’t find any articles or posts that directly address this.

    Thanks,

    Fred

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    A combobox RowSource can be an SQL statement. I don't understand why the SQL is using concatenation.

    Is combobox AutoExpand property set to Yes?
    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
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246
    The client wants to see the Company Name, First Name, Last Name, and Address to be able to choose amongst lets say several John Smiths. So I just concatenated them together to make it easier since only the EntityID PK is written to the table. Would that cause the problem with typing?

    AutoExpand property is set to Yes.

    Fred

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Oh of course, that does make sense.

    The AutoExpand should still work.

    What are other properties of combobox?

    ControlSource
    BoundColumn
    ColumnCount
    ColumnWidths

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  5. #5
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246
    June7

    Other Properties of Combobox

    Controlsource = EntityID
    Row Source = SELECT [JoinEntityToProperty].[EntityID], [JoinEntityToProperty].[Name], [JoinEntityToProperty].[Address] FROM [JoinEntityToProperty] ORDER BY [Name];

    Bound Column = 1
    Column Count = 3
    Column Width 0";2";5"
    Allow Value List Edits = no
    Inherit Value List = yes
    Show only Row Source Values = no
    Enables = Yes
    Locked = No
    AutoExpand = yes

    Respectively 0 is primary key, 2= Entity Name, 3= Address concatenation.

    I connect ODBC to a Sql Server 2008 r2. I can only send you the screen. Would that help?

    Thanks Fred

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I doubt image would help.

    What table is this form bound to - what table is form intended for data entry/edit? Are you sure the combobox ControlSource is bound to field from that table?

    Otherwise, I can't see anything wrong with the setup.

    Would have to analyse db. If you want to make copy and import data and provide file, follow instructions at bottom of my post.
    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.

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

Similar Threads

  1. Replies: 6
    Last Post: 02-19-2014, 11:11 AM
  2. Using a Combo Box to jump to a record
    By Access_Novice in forum Forms
    Replies: 3
    Last Post: 11-19-2013, 04:14 PM
  3. Replies: 3
    Last Post: 07-03-2013, 10:38 AM
  4. Replies: 3
    Last Post: 12-11-2012, 09:12 AM
  5. Replies: 1
    Last Post: 10-30-2012, 10:29 AM

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