return value from recordset to textbox

  • Thread starter Thread starter Microsoft
  • Start date Start date
M

Microsoft

If I have a form that has a recordset calling info out of a table. How can
I return that data from the recordset to the txtbox in a form?

dim rst as adodb.recordset
dim conn as adodb.connection

set conn = current.project
set rst=new adodb.recordset

rst.open "customers"
do until rst.eof
rst.movenext
loop

Now I have my data. I want to display it in a text boxes on my form that I
can use the recordselector for to move to the next record displaying the
first record first. BOF
 
-----Original Message-----
If I have a form that has a recordset calling info out of a table. How can
I return that data from the recordset to the txtbox in a form?

dim rst as adodb.recordset
dim conn as adodb.connection

set conn = current.project
set rst=new adodb.recordset

rst.open "customers"
do until rst.eof
rst.movenext
loop

Now I have my data. I want to display it in a text boxes on my form that I
can use the recordselector for to move to the next record displaying the
first record first. BOF
Hi,
If you simply have the form's record source as the
customers table, you can then have the control source for
each textbox bound to any field of this table. You then
use the built-in record navigation bar. Using this
approach will save you a tonne of code.

I recommend that you examine the sample database Northwind.

Luck
Jonathan
 
Back
Top