value to textbox

D

Dave

Hi

I have the code below on my database. It gives me the highest value in my
table. How do I drop that value into a textbox on screen?

Thanks


Dim rst22 As ADODB.Recordset

Set rst22 = New ADODB.Recordset
With rst22
.ActiveConnection = CurrentProject.Connection
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.Open "SELECT Max(InvoiceSum.InvNumber) AS MaxOfInvNumber FROM
InvoiceSum"
End With

rst22.Close
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top