creating a detailed info pop up out of listbox

EnglisAP

Registered User.
Local time
Today, 14:09
Joined
Dec 16, 2010
Messages
20
what i currently have is a list box that lists calls and on the on click command it opens a form to show all the details the forms are working correctly the only issue i have is that the id column which is hidden in the listbox is not updating when i select another item. the code is as follows any idea?
Code:
Private Sub CallSearchResults_Click()
DoCmd.OpenForm "Call Info"
Forms![Call Info]![fnameTXT].Value = Forms![Customer Support Department]![fnametb].Value
Forms![Call Info]![lnameTXT].Value = Forms![Customer Support Department]![lnametb].Value
Forms![Call Info]![phonetxt].Value = Forms![Customer Support Department]![CallSearchResults].Column(3)
Forms![Call Info]![DateCallTXT].Value = Forms![Customer Support Department]![CallSearchResults].Column(1)
Forms![Call Info]![TimeCallTXT].Value = Forms![Customer Support Department]![CallSearchResults].Column(2)
Dim ID As Integer
ID = [CallSearchResults].Column(0)
Forms![Call Info]![DepartmentTXT].Value = DLookup("[Department]", "[Call Information]", "[ID] = ID")
Forms![Call Info]![Remarkstxt].Value = DLookup("[Remarks]", "[Call Information]", "[ID] = ID")
End Sub
 
Is there some reason you don't have the Call Info form a bound form? If you would make it a bound form you could just open it passing in a criteria or filter statement and it would go to the correct record.
 
Shouldn't

ID = [CallSearchResults].Column(0)

be

Forms![Customer Support Department]![CallSearchResults].Column(0)
 

Users who are viewing this thread

Back
Top Bottom