Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run time error 3075 1

Status
Not open for further replies.

tksy

Programmer
Joined
Oct 28, 2008
Messages
22
Location
DE
HI

I am gettinga run time error in´my code

Sub UpdateNulls()
Dim strSQL As String
Dim rs As DAO.Recordset
For Each tdf In CurrentDb.TableDefs
If Left(tdf.Name, 4) <> "Msys" And tdf.Name <> "Table1" Then
strSQL = "Select * From [" & tdf.Name & "] a Inner Join table1 On a.fall = table1.fall Where a.Status = 5"

Set rs = CurrentDb.OpenRecordset(strSQL)

Do While Not rs.EOF
For i = 0 To rs.Fields.Count - 1
If IsNull(rs.Fields(i)) Then
rs.Edit
rs.Fields(i) = 111111
rs.Update
End If
Next
rs.MoveNext
Loop

End If
Next
End Sub


I am getting runtime error on operator missing
a.fall = table1.fall

 
OOps, misunderstood the "first table" stuff.
You meant that 01UMWELT wasn't updated but the others ?
The Simplest way:
For Each tdf In CurrentDb.TableDefs
If Left(tdf.Name, 4) <> "Msys" Then
strSQL = "Select a.* From [" & tdf.Name & "] a Inner Join 01UMWELT On a.fall = [01UMWELT].fall Where [01UMWELT].Status = 5"
...


Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
THanks that helped
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top