<p>I have  database with many tables. In the first table, I have a field called <code>status</code>.</p>

<pre><code>table 1
idno   name    status
111    hjghf   yes
225    hjgjj   no
345    hgj     yes
</code></pre>

<p>Other tables could have same <code>idno</code> with different fields.</p>

<p>I want to check the status for each id no and if it is yes then for that id number in all tables for all null and blank fields I want to update them as 111111.</p>

<p>I am looking for a sample vba code for this which I can adapt.</p>

<p>Thanks</p>

Here is some largely untested code. Hopefully it will give you a start.
```
```
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.idno = Table1.idno Where Table1.Status = 'Yes'"

        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
```
```