K
Keith
Hello,
In Textbox 32, of my form, I need to pt in the value Selected_Year which is
in the first row of table t_Parameters1
The table is not bound to the form . I wrote the code below and put it into
the Form, Load subroutine where it does not work. What do I need to do to
make this work and show the value?
Thank you,
Keith
The code follows
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("t_Parameters1")
rst.MoveFirst
temp = rst!Selected_year ' this shows the value
Me.Text32.Text = rst!Selected_year ' this does not work, but it is
what I want to do
rst.Close
' Stop
In Textbox 32, of my form, I need to pt in the value Selected_Year which is
in the first row of table t_Parameters1
The table is not bound to the form . I wrote the code below and put it into
the Form, Load subroutine where it does not work. What do I need to do to
make this work and show the value?
Thank you,
Keith
The code follows
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("t_Parameters1")
rst.MoveFirst
temp = rst!Selected_year ' this shows the value
Me.Text32.Text = rst!Selected_year ' this does not work, but it is
what I want to do
rst.Close
' Stop