I am using a loop procedure to Call other subs
Set rsNames = CurrentDb.OpenRecordset("SELECT tblReportProduction.[Report Name], tblReportProduction.[Sub Name], tblReportProduction.Available, tblReportProduction.AutoNumber FROM tblReportProduction WHERE (((tblReportProduction.Available)=Yes));")
Do While Not rsNames.EOF
strReportNames = rsNames.[Report Name]
strSubNames = rsNames.[Sub Name]
Call strSubNames
When I run the code I receive an error message 'Compile error' 'Expected Sub'
Can anyone help, the loop is OK...
Set rsNames = CurrentDb.OpenRecordset("SELECT tblReportProduction.[Report Name], tblReportProduction.[Sub Name], tblReportProduction.Available, tblReportProduction.AutoNumber FROM tblReportProduction WHERE (((tblReportProduction.Available)=Yes));")
Do While Not rsNames.EOF
strReportNames = rsNames.[Report Name]
strSubNames = rsNames.[Sub Name]
Call strSubNames
When I run the code I receive an error message 'Compile error' 'Expected Sub'
Can anyone help, the loop is OK...