murray83
Games Collector
- Local time
- Today, 10:25
- Joined
- Mar 31, 2017
- Messages
- 870
have the following code when the user presses to add a record 
	
	
	
		
but when the dept ( as shown in error 0) says #Error i get the error message as shown in error 1
any help would be great
cheers
 
		Code:
	
	
	'adds record to main table
If Len(Me.txtDept1) >= 1 Then
DoCmd.RunSQL ("INSERT INTO main ( FromBay, ToBay, [Requested By], RequestID, Dept  )VALUES (fromBay.value, ToBay.value, txtUserLookup.value, txtusername.value, txtDept.value )")
'shows ballon tip for new record
ShowBalloonTooltip "New Move Request", "A New Request Has Been Placed", btInformation
Else
MsgBox ("Dept not popultaed, please wait")
End Ifbut when the dept ( as shown in error 0) says #Error i get the error message as shown in error 1
any help would be great
cheers
 
	 
 
		 
			 
			 
			 
 
		 
 
		 
 
		