RedHeadedMonster
New member
- Local time
- Today, 13:18
- Joined
- Feb 27, 2013
- Messages
- 8
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 on the first line
 
So I tried:
 
If Forms!frmIdeas.frmIdeas_Questions.Form.maxQID is nothing Then
 
Dim sqlQ6 As String
sqlQ6 = "INSERT INTO tblQuestions ( ideaID, questionID) Values (ideaID, 6)"
DoCmd.RunSQL sqlQ6
 
Else
 
End if
 
*Send email code*
 
then I dont get the error, It sends the email, but does NOT insert data into table.
 
Any help is appreciated.
Thanx!
RHM
 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 on the first line
So I tried:
If Forms!frmIdeas.frmIdeas_Questions.Form.maxQID is nothing Then
Dim sqlQ6 As String
sqlQ6 = "INSERT INTO tblQuestions ( ideaID, questionID) Values (ideaID, 6)"
DoCmd.RunSQL sqlQ6
Else
End if
*Send email code*
then I dont get the error, It sends the email, but does NOT insert data into table.
Any help is appreciated.
Thanx!
RHM
			
				Last edited: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
	 
 
		 
 
		 
 
		