G
GrandMaMa
We have a new software package from the bank. However we have one problem
with it! All of the other packages we have plus the one's we wrote use
LoanNo as the name of the field containing the Loan Number.
The application we have purchased use HMDA - LOAN NUMBER. I want to change
this Field to LoanNo
Here is the code I have so far. It does not work! I get no halts of any
kind. If someone knows the correct script I would really appreciate it!
Private Sub CmdB_Click()
Dim db As Database
Dim rst As Recordset
Dim tdf As TableDef
Dim tdfOld As Field
Dim fldLoop As Field
Dim fldCount As Byte
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT * FROM tblWklyUpdt")
Set tdfOld = db.TableDefs(0).Fields(0)
fldCount = 0
For Each fldLoop In rst.Fields
If fldLoop.Name = "HMDA - LOAN NUMBER" Then
tdfOld.Name = "LoanNo"
MsgBox " " & fldLoop.Name
End If
fldCount = fldCount + 1
Next fldLoop
End Sub
Many Thank You's!
with it! All of the other packages we have plus the one's we wrote use
LoanNo as the name of the field containing the Loan Number.
The application we have purchased use HMDA - LOAN NUMBER. I want to change
this Field to LoanNo
Here is the code I have so far. It does not work! I get no halts of any
kind. If someone knows the correct script I would really appreciate it!
Private Sub CmdB_Click()
Dim db As Database
Dim rst As Recordset
Dim tdf As TableDef
Dim tdfOld As Field
Dim fldLoop As Field
Dim fldCount As Byte
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT * FROM tblWklyUpdt")
Set tdfOld = db.TableDefs(0).Fields(0)
fldCount = 0
For Each fldLoop In rst.Fields
If fldLoop.Name = "HMDA - LOAN NUMBER" Then
tdfOld.Name = "LoanNo"
MsgBox " " & fldLoop.Name
End If
fldCount = fldCount + 1
Next fldLoop
End Sub
Many Thank You's!