-
Spliting a form
Hi there,
I had help designing this form 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()
Me.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.TrainingDone = Null
Me.TeamLeaderRating = Null
Me.TeamLeaderComments = Null
Me.Training.Requery
End Sub
It is a form which is for a competency matrix. I would like to split this form into 2 pieces. I have a training completed list box that is dependent on RepName, I would like this to be in a seperate form and the user clicks a button to be directed to this new form. I have tried copying and pasting this but I am recieving errors.
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()
Me.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
When I click the training completed button it jumps to visual and puts the above in yellow highlight (red here) and says:
Compile Error
Method or Data Membor Not Found
Can anyone please help me with this? I have little experience with SQL but I'm ok with access.
Thanks in advance for your help
-
The error would imply that either Training is not a control on the form, or it is but is not a type that has a requery method.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules