Hi All,
Basically i have a form which consists of
Officer
Line Manager
Employee_Name
Date
The user selects an Officer which then filters the line manager then they select the employee which will then show the dates in a list box which have records for that employee.
They will then select a date and click find which will then open a form. (The form is dependent on the officer)
below is the code im currently using...
Currently when i click find, the form is not opening with the record. its opening blank with no date at all.
Any help is appreciated!
Regards
OMS
Basically i have a form which consists of
Officer
Line Manager
Employee_Name
Date
The user selects an Officer which then filters the line manager then they select the employee which will then show the dates in a list box which have records for that employee.
They will then select a date and click find which will then open a form. (The form is dependent on the officer)
below is the code im currently using...
Code:
Private Sub Find_Feedback_Form_Click()
On Error GoTo Err_Find_Feedback_Form_Click
Dim stLinkCriteria As String
Dim stDocName As String
Dim stDate As String
If Me!Combo_Officer = "Ann Ward" Then
stDocName = "frm_acceptance_feedback"
ElseIf Me!Combo_Officer = "Carol Metcalf" Then
stDocName = "frm_enquirys_feedback"
ElseIf Me!Combo_Officer = "Deb Ludbrook" Then
stDocName = "frm_enquirys_feedback"
ElseIf Me!Combo_Officer = "Dharmesh Patel" Then
stDocName = "frm_enquirys_feedback"
ElseIf Me!Combo_Officer = "Emma King" Then
stDocName = "frm_enquirys_feedback"
ElseIf Me!Combo_Officer = "Learie Eversley" Then
stDocName = "frm_damages_feedback"
ElseIf Me!Combo_Officer = "Liz Hutchinson" Then
stDocName = "frm_planning_feedback"
ElseIf Me!Combo_Officer = "Nina Ohol" Then
stDocName = "frm_quotes_feedback"
ElseIf Me!Combo_Officer = "Phil Cushen" Then
stDocName = "frm_enquirys_feedback"
ElseIf Me!Combo_Officer = "Rebecca Coxon" Then
stDocName = "frm_systems&strgy_feedback"
ElseIf Me!Combo_Officer = "Reshma Bodalia" Then
stDocName = "frm_diverbilling_feedback"
End If
stLinkCriteria = "[Employee_Name]= '" & Me![cboemployee] & "' And [Date]=#" & Me![Date] & "#"
' Temporary debugging code; delete when correct criteria string obtained
Debug.Print stLinkCriteria
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit
Exit_Find_Feedback_Form_Click:
Exit Sub
Err_Find_Feedback_Form_Click:
MsgBox Err.Description
Resume Exit_Find_Feedback_Form_Click
End Sub
Currently when i click find, the form is not opening with the record. its opening blank with no date at all.
Any help is appreciated!
Regards
OMS