Hi there. I would like to set the focus on a component cmdBookNoTitle in my main form from an Error Event handler of a subform.
The name of my subform is frmStudentBooksSubform.
The parent form is frmLearnerBaseDetails
The component on the main form is cmdBookNoTitle.
Thanks
Error Event code:
If DataErr = 3022 Then
MsgBox "Duplicate unique number.", vbInformation, "Message"
Response = 0
Me.StudentBookIssue_ID = ""
SendKeys "{esc}", True
SendKeys "{esc}", True
Exit Sub
End If
 The name of my subform is frmStudentBooksSubform.
The parent form is frmLearnerBaseDetails
The component on the main form is cmdBookNoTitle.
Thanks
Error Event code:
If DataErr = 3022 Then
MsgBox "Duplicate unique number.", vbInformation, "Message"
Response = 0
Me.StudentBookIssue_ID = ""
SendKeys "{esc}", True
SendKeys "{esc}", True
Exit Sub
End If
			
				Last edited: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
	
 
 
		 
 
		