I have a form that is in a customer support database. The form (Customer information) has a subform (case Information), which is then linked to another form (case updates).
On the case information subform (call it subCaseInfo), I assign a case number and take down various info about the customer's setup. What I would like to do is add a couple of unbound text fields that would display the initial entry and last entry in the linked frmCaseUpdates form. The idea is that the tech would be able to see the problem and resolution on the main form without having to open up the updates form. DMIN and DMAX won't pull the info in for a memo field, and I have tried building an SQL string which works, but of course I can't bind a text box to an SQL statement. Any ideas?
You could toss that into a function that takes a case number as a parameter as well..
Public Sub GetMaxDate(case As String) As Date
GetMaxDate = DLookup("memofield", "case_entry", "case_number = '" & case & _
"' AND case_date = DMAX("case_date","case_entry", "case_number = '" & case & "'"))
Thanks for the reply.. We are pretty close.. Using the dlookup I get a type mismatch, yet I can use each of them by themselves successfully. Using the code, I get an "Expected:Identifier" referencing "(case As String)". I may be trying to use the code wrong, as I am not that up on using public code (working on it though).