Hi all,
I am new to VBA and am having trouble creating a connection to the db I am working in. I found some code but is giving me a "User-Defined type not defined" on the first line. My guess is I will get it also on the second line. What am I doing wrong?
I need to loop through a table and set 4 fields equal to 4 other fields in the same table.
Private Sub Form_Load()
Dim rst As New ADODB.Recordset
Dim cnn As ADODB.Connection
Set cnn = CurrentProject.Connection
Set rstTry = New ADODB.Recordset
rstTry.Open "Assessments"
While rstTry.EOF = False
rstTry![BR Land Lot] = rstTry![SAEQ Land Lot]
rstTry.MoveNext
Wend
End Sub
Thanks in advance.
KT
I am new to VBA and am having trouble creating a connection to the db I am working in. I found some code but is giving me a "User-Defined type not defined" on the first line. My guess is I will get it also on the second line. What am I doing wrong?
I need to loop through a table and set 4 fields equal to 4 other fields in the same table.
Private Sub Form_Load()
Dim rst As New ADODB.Recordset
Dim cnn As ADODB.Connection
Set cnn = CurrentProject.Connection
Set rstTry = New ADODB.Recordset
rstTry.Open "Assessments"
While rstTry.EOF = False
rstTry![BR Land Lot] = rstTry![SAEQ Land Lot]
rstTry.MoveNext
Wend
End Sub
Thanks in advance.
KT