Please help with If Statement
Hi there,
 
I have a form that has details of a competency Matrix with 5 combo boxes:
 
Team Leader
Rep Name
Belt
Competency
Team Leads Rating
 
I have the form set up to after updates etc with the following code:
 
Option Compare Database
Private Sub Combo12_AfterUpdate()
Me.Competency = Null
Me.Behaviour = Null
Me.Competency.Requery
End Sub
Private Sub Command50_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "qry_Progress_Report"
DoCmd.RunMacro "mac_Progress_Update"
End Sub
Private Sub Competency_AfterUpdate()
Me.Behaviour = Null
Me.Behaviour.Requery
End Sub
Private Sub RepName_AfterUpdate()
Forms("Training Done").Controls("Training").Requery
End Sub
Private Sub Teamlead_AfterUpdate()
Me.RepName = Null
Me.RepName.Requery
End Sub
Private Sub Teamlead_Enter()
Me.Teamlead = Null
Me.RepName = Null
Me.Belt = Null
Me.Competency = Null
Me.Behaviour.Requery
Me.TeamLeaderRating = Null
End Sub
Private Sub RepName_Enter()
Me.Belt = Null
Me.Competency = Null
Me.Behaviour.Requery
Me.TeamLeaderRating = Null
End Sub
Private Sub Belt_Enter()
Me.Competency = Null
Me.Behaviour.Requery
Me.TeamLeaderRating = Null
End Sub
 
It's perfect except now my manager wants the Belt to come up automically based on tenure - I added the tenure box to query builder but now I need an if statement to do this right?
 
Could anyone be so kind to help me please?
 
I would really appreciate it!!!
 Hi there,
I have a form that has details of a competency Matrix with 5 combo boxes:
Team Leader
Rep Name
Belt
Competency
Team Leads Rating
I have the form set up to after updates etc with the following code:
Option Compare Database
Private Sub Combo12_AfterUpdate()
Me.Competency = Null
Me.Behaviour = Null
Me.Competency.Requery
End Sub
Private Sub Command50_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "qry_Progress_Report"
DoCmd.RunMacro "mac_Progress_Update"
End Sub
Private Sub Competency_AfterUpdate()
Me.Behaviour = Null
Me.Behaviour.Requery
End Sub
Private Sub RepName_AfterUpdate()
Forms("Training Done").Controls("Training").Requery
End Sub
Private Sub Teamlead_AfterUpdate()
Me.RepName = Null
Me.RepName.Requery
End Sub
Private Sub Teamlead_Enter()
Me.Teamlead = Null
Me.RepName = Null
Me.Belt = Null
Me.Competency = Null
Me.Behaviour.Requery
Me.TeamLeaderRating = Null
End Sub
Private Sub RepName_Enter()
Me.Belt = Null
Me.Competency = Null
Me.Behaviour.Requery
Me.TeamLeaderRating = Null
End Sub
Private Sub Belt_Enter()
Me.Competency = Null
Me.Behaviour.Requery
Me.TeamLeaderRating = Null
End Sub
It's perfect except now my manager wants the Belt to come up automically based on tenure - I added the tenure box to query builder but now I need an if statement to do this right?
Could anyone be so kind to help me please?
I would really appreciate it!!!
			
				Last edited: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
	 
 
		 
 
		