Make search result records clickable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • terryechols1
    New Member
    • Jul 2016
    • 26

    Make search result records clickable

    I have created a form to use for searching records in the Calls database. Under the forms controls/text boxes for search criteria is an Unbound display of the results (not a subForm). I'd like to make the records returned each clickable and open the Call Details form to that record.

    The search form "Search For Call Details" has the Calls table as it's record source. In the "Search Results" (the Unbound part) I have the following SQL:
    Code:
    SELECT Calls.ID, Calls.Address, Calls.City, Calls.Appliance, [Customers Name].[Customer Name] AS [Called In By] FROM Calls LEFT JOIN [Customers Extended] AS [Customers Name] ON Calls.[Called In By] = [Customers Name].ID WHERE (((Calls.ID)<>Form!ID) And ((Calls.Address) Like "*" & [txtAddressContains] & "*") And ((Calls.City) Like "*" & [txtCityContains] & "*") And (([cboAssignedTo]) Is Null Or ([cboAssignedTo])=[Assigned To]) And (([cboOpenedBy]) Is Null Or ([cboOpenedBy])=[Opened By]) And (([cboStatus]) Is Null Or ([cboStatus])=[Status]) And (([cboCategory]) Is Null Or ([cboCategory])=[Category])) ORDER BY Calls.Address;
    It displays correctly based on what they search for but I would like to have the results (each record) clickable to open up the "Call Details" form.

    Both are using the Calls table so how do I make the ID in the results clickable and return the correct call record and open the Call Details form to that record?

    I've uploaded an image so you can see the results section.

    Thanks,
    Terry
    [IMGNOTHUMB]https://bytes.com/attachments/attachment/8866d1472155585/search-form.jpg[/IMGNOTHUMB]
    Last edited by NeoPa; Aug 25 '16, 08:43 PM. Reason: Made pic viewable
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    I get it's not a subform, and that it's unbound, but that's all you tell us about the most important part of the question. What are you using? Why isn't it bound?

    Guessing, while short of info, I'd suggest detail records that are filtered by the values in the controls above. That way double-clicking on any control in the record can be handled easily.

    Comment

    Working...