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:
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]
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;
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]
Comment