W7 32bit pro, Access 2003
I have created a query to populate a textbox, the query looks OK but what do I have to do to actually get the results of the query in the textbox?
With the above code I end up with #Name in the textbox.
tia Jack
I have created a query to populate a textbox, the query looks OK but what do I have to do to actually get the results of the query in the textbox?
Code:
' populate the summary boxes
' first create the queries
strQueryName = "qryAcquisitionsFund1SumBookOrders"
If utfnQueryExists(strQueryName) Then
dbs.QueryDefs.Delete strQueryName
End If
strQuery = "SELECT SUM(nNumberOrdered) FROM " & gcstrAcquisitionsTableName
strQuery = strQuery & " WHERE tStatus <> '" & gcstrStatusNew & "'"
strQuery = strQuery & " AND nFund = 1 "
strQuery = strQuery & " AND (dtOrdered >= #" & strStartDate & "# AND dtordered <= #" & strEndDate & "#) "
Set qryDef = dbs.CreateQueryDef(strQueryName, strQuery)
Me.txtFund1Ordered.ControlSource = strQueryName
tia Jack