My Assistant
![]() ![]() |
|
|
Dec 27 2005, 10:31 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 121 From: San Antonio, TX |
I have a report that shows phone calls for a selected Contact for a select period.
I have a Date Range Form on which I put an unbound ComboBox to select a Contact for a report. The row source for the ComboBox: SELECT Contacts.ContactID, qryContactNameV1.ContactName FROM Contacts INNER JOIN qryContactNameV1 ON Contacts.ContactID = qryContactNameV1.ContactID; I have Col count =2, and widths = 0.5";2" I have a query for the report: SELECT qryContactNameV1.ContactID, qryContactNameV1.ContactName, Calls.CallDate, Calls.CallTime, Calls.Subject, Calls.Notes FROM Calls INNER JOIN qryContactNameV1 ON Calls.ContactID = qryContactNameV1.ContactID WHERE (((qryContactNameV1.ContactID)=[Forms]![frmReportDateRangeForCallsV1]![ContactSe l]) AND ((Calls.CallDate)>=[forms]![frmReportDateRangeForCallsV1]![Start Date] And (Calls.CallDate)<=[forms]![frmReportDateRangeForCallsV1]![End Date])) ORDER BY qryContactNameV1.ContactName; I When I click the ComboBox for drop down list, it shows both ContactID and ContactName. But when I select, only the ID posts in the field. I need the ID for ease of navigating to the correct Contact out of several thousand; however if only the ID posts it may be disconcerting to the user. How can I get the ID and Name to post? Thanks |
|
|
|
Dec 27 2005, 10:40 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 9,209 From: Maryland |
You only want the ID to be recorded to the table. If you need the name to show on the table for a user confidence issue that add an unbound text box and have this =Me.ComboBoxName.Column(1).
HTH. |
|
|
|
Dec 27 2005, 11:26 AM
Post
#3
|
|
|
UtterAccess Addict Posts: 121 From: San Antonio, TX |
Thanks for your response.
I entered =[Me].[ContactSel].[Column](1) in Control Source of the unbound text box and it returns #Name? The ComboBox name is ContactSel What might I have done wrong? Thanks |
|
|
|
Dec 27 2005, 11:48 AM
Post
#4
|
|
|
UA Editor + Utterly Certified Posts: 22,722 From: Melton Mowbray,Leicestershire (U.K) |
Hi
Remind me on how many columns has your combo got..? Also lose some of the characters.. From: =[Me].[ContactSel].[Column](1) To: =[ComboControlName].Column(1) Ps: Just a note when referencing columns they start at (0),1,2,3,4,etc.. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif) |
|
|
|
Dec 27 2005, 12:07 PM
Post
#5
|
|
|
UtterAccess Addict Posts: 121 From: San Antonio, TX |
The code change did it; many thanks!
The ComboBox has two columns. Again, thanks to both of you |
|
|
|
Dec 27 2005, 12:11 PM
Post
#6
|
|
|
UA Editor + Utterly Certified Posts: 22,722 From: Melton Mowbray,Leicestershire (U.K) |
Hi
You're welcome and glad we could assist.. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif) |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 05:58 PM |