Further to madpiet's suggestion:
-you can iterate over all of your tables, and
-for each field you can test the Required Property
Here's an example,note it checks all non-system tables
Code:
' ----------------------------------------------------------------
' Procedure Name: IdentifyRequiredFields
' Purpose: To Identify which fields in tables are required.
' Procedure Kind: Sub
' Procedure Access: Public
' Author: Jack
' Date: 16-Feb-23
' ----------------------------------------------------------------
Sub IdentifyRequiredFields()
Dim tdf As DAO.TableDef
For Each tdf In CurrentDb.TableDefs
If Not tdf.name Like "MSys*" Then RequiredOutput tdf
'Note
'You could add other table names to be excluded OR
' Only include the table names you want to interrogate
Next
End Sub
The called subprocedure
Code:
' ----------------------------------------------------------------
' Procedure Name: RequiredOutput
' Purpose: Procedure to show if the table field is Required or not
' Procedure Kind: Sub
' Procedure Access: Public
' Parameter tdfTemp (TableDef):
' Author: Jack
' Date: 12-Mar-20
' ----------------------------------------------------------------
Sub RequiredOutput(tdfTemp As TableDef)
On Error GoTo RequiredOutput_Error
Dim fld As Field
' Enumerate Fields collection of the specified TableDef
' and show the Required property.
10 Debug.Print "Fields in " & tdfTemp.name & ":"
20 For Each fld In tdfTemp.Fields
30 ' If fld.Required Then
40 Debug.Print , fld.name & ", Required = " & _
fld.Required
50 ' Else
60 ' End If
70 Next fld
On Error GoTo 0
RequiredOutput_Exit:
Exit Sub
RequiredOutput_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure RequiredOutput, line " & Erl & "."
GoTo RequiredOutput_Exit
End Sub