I have the following code:
 
If Forms!frmIdeas.frmIdeas_Questions.Form.maxQID = 6 Then 
 
Else
 
Dim sqlQ6 As String
sqlQ6 = "INSERT INTO tblQuestions ( ideaID, questionID) Values (ideaID, 6)"
DoCmd.RunSQL sqlQ6
 
End if
 
*Send email code*
 
And I get the 2427 No data error if there is no data...