So what I want to do is have multiple forms sourcing the same table and the opening of which form is depending on which type of work is being carried out.
What I have done so far is create a column that has a small statement referring to what what type of work is being done for each record, then under a click event (the Job No) a set of else if statements.
Code:
Private Sub JobNo_Click()
Dim Strfun As String
If Me.TypeOfApproval = "CDC Only" Then
Strfun = "JobsFCDCOnly"
ElseIf Me.TypeOfApproval = "Stage Inspections" Then
Strfun = "JobsF"
ElseIf Me.TypeOfApproval = "CDC, PCA and OC" Then
Strfun = "JobsFCDCOC"
ElseIf Me.TypeOfApproval = "CC, PCA and OC" Then
Strfun = "JobsFCCPCAOC"
ElseIf Me.TypeOfApproval = "CC Only" Then
Strfun = "JobsFCCOnly"
ElseIf Me.TypeOfApproval = "PC and OC Only" Then
Strfun = "JobsFPCOC"
ElseIf Me.TypeOfApproval = "BCA Report" Then
Strfun = "JobsFReport"
End If
DoCmd.OpenForm Strfun, acNormal, , "ID=" & Me.ID
Ive done some google research and what I have above should work but I am getting a run-time error "The action or method requires a Form Name argument"
Anyone able to shed some light on where I've gone wrong?