I have a form built for the team to log calls made to customers. They may have multiple calls with the same customer who all have a unique ID assigned. I've built a form so that the team member can select a customer ID in the combo box and then using VBA, unbound text boxes will display the customer's name, phone number, and address (which is stored on a customer demographics table). All of this part so far has been working just fine.
My problem is that there is a text box on my form where team members can insert notes about the call. I've been asked by the team lead to make it so that when the customerID is selected, that notes box automatically populates with the last call's notes, and that team members can enter add on more notes. So for example in the last call on 4/1, the notes were "4/1 - Spoke to customer, order is on the way", and now it's 4/8, they're calling customer and want to see the last notes, the box should show that note from 4/1. Is there a way to do this? I've tried using the combo box option tying this to the customer ID combo box but can't quite get it to work. Thank you!
SELECT Notes,
CustID FROM (SELECT Call1.CustID,
Count(*) AS Rank,
Call1.DateCalled, Call1.Notes FROM Call AS Call1
INNER JOIN Call AS Call2 ON Call1.CustID = Call2.CustID
WHERE ((Call2.DateCalled>=Call1.DateCalled))
GROUP BY Call1.CustID, Call1.DateCalled ORDER BY 1, 2) WHERE Rank=1) AS Call ON CustTable.CustID=Call.[CustID]