I am using an SQL query I designed in Access 97 to call uppon the string "AppName", which it uses to search the database, then it returns with a total. Here is the code I am currently using:

Private Sub cmdLicence_Click()
Dim AppName As String

AppName = _
InputBox("Which Application title would you like to sum licences for?")
'Get name from user, via InputBox

datSum.RecordSource = "select * from Southwing " & _
"where Apps = '" & AppName & "'"
'Merge that name with an SQL string


Is there a way to convert this code to place the results of the query in that txtbox? Or maybe an easier way to do it without using a Data Control?