I'm trying to change the LINEABBR field to 18. Can anyone figure out what's wrong with this function? Thanks
BLOCKNAME LINEABBR NODEABBRA NODEABBRB
004-02 4 AIRP MLK
004-02 4 AIRP MLK
004-02 4 AIRP MLK
004-02 4 AIRP MLK
004-02 4 SPRI MLK
004-02 4 SPRI MLK
004-02 4 SPRI MLK
004-02 4 AIRP MLK
004-02 4 SPRI MLK
004-02 4 VARG H183
004-02 4 IH35 E7TH
004-02 4 IH35 E7TH
004-02 4 IH35 E7TH
004-02 4 IH35 E7TH
004-02 4 PVAL E7TH
004-02 4 PVAL E7TH
004-02 4 PVAL E7TH
004-02 4 PVAL E7TH
004-02 4 PVAL E7TH
004-02 4 TECH CENTR
004-02 4 TECH CENTR
004-02 4 TECH CENTR
004-02 4 TECH CENTR
Public Function basPairedRoutes()
Dim dbs As DAO.Database
Dim rstSrc As DAO.Recordset
Set dbs = CurrentDb
Set rstSrc = dbs.OpenRecordset("WithoutPairedRoutes", dbOpenDynaset)
With rstSrc
While Not .EOF
If ((!BLOCKNAME = "004-02" And _
!NODEABBRA = "SPRI" And !NODEABBRB = "MLK")) Then
'Edit Record
.Edit
!LINEABBR = "18"
.Update
End If
.MoveNext
Wend
End With
rstSrc.Close
Set rstSrc = Nothing
End Function
BLOCKNAME LINEABBR NODEABBRA NODEABBRB
004-02 4 AIRP MLK
004-02 4 AIRP MLK
004-02 4 AIRP MLK
004-02 4 AIRP MLK
004-02 4 SPRI MLK
004-02 4 SPRI MLK
004-02 4 SPRI MLK
004-02 4 AIRP MLK
004-02 4 SPRI MLK
004-02 4 VARG H183
004-02 4 IH35 E7TH
004-02 4 IH35 E7TH
004-02 4 IH35 E7TH
004-02 4 IH35 E7TH
004-02 4 PVAL E7TH
004-02 4 PVAL E7TH
004-02 4 PVAL E7TH
004-02 4 PVAL E7TH
004-02 4 PVAL E7TH
004-02 4 TECH CENTR
004-02 4 TECH CENTR
004-02 4 TECH CENTR
004-02 4 TECH CENTR
Public Function basPairedRoutes()
Dim dbs As DAO.Database
Dim rstSrc As DAO.Recordset
Set dbs = CurrentDb
Set rstSrc = dbs.OpenRecordset("WithoutPairedRoutes", dbOpenDynaset)
With rstSrc
While Not .EOF
If ((!BLOCKNAME = "004-02" And _
!NODEABBRA = "SPRI" And !NODEABBRB = "MLK")) Then
'Edit Record
.Edit
!LINEABBR = "18"
.Update
End If
.MoveNext
Wend
End With
rstSrc.Close
Set rstSrc = Nothing
End Function