wrightyrx7
Registered User.
- Local time
- Today, 00:50
- Joined
- Sep 4, 2014
- Messages
- 104
Hi all,
I am trying to make a couple of mandetory fields via VBA.
	
	
	
		
However, when I was testing it the textbox kept coming back as NULL even when it contained avalue. After playing around to try and correct it i noticed that when i removed focus from the textbox in question, it was picking up the value.
The code runs when the save button is pressed.
So is there a way to correct this? Or do I removed focus from the textbox before the code above is run?
 I am trying to make a couple of mandetory fields via VBA.
		Code:
	
	
	If IsNull(Me.Name) Or Me.Name = "" Then
    MsgBox "Unable to save without a Name", vbOKOnly, "Missing Data"
    Exit Sub
End IfHowever, when I was testing it the textbox kept coming back as NULL even when it contained avalue. After playing around to try and correct it i noticed that when i removed focus from the textbox in question, it was picking up the value.
The code runs when the save button is pressed.
So is there a way to correct this? Or do I removed focus from the textbox before the code above is run?
 
	 
 
		 
 
		 
 
		
 
 
		 
	 
 
		