Hi
I've been working with Access 2003 for a while, but am not so good on the code side of things.
This is the code I want to alter:
Private Sub cmdEdit_Click()
Dim stDocName As String
Dim strFilter As String
Dim stLinkCriteria As String
stDocName = "frm_Results"
strFilter = "Number= '" & Me.Number & "'"
stLinkCriteria = "frm_CIF_To_Be_Actioned"
DoCmd.OpenForm stDocName, acNormal, , strFilter, , , stLinkCriteria
End Sub
Currently on 'Click' opens "frm_Results". What I'm wanting to happen is for a particular form to be opened based on the following:
if Preventative_Reqd = -1, open "frm_ResultsPreventative, otherwise open "frm_results".
Preventative_Reqd is a yes/no field elsewhere on the form. Depending which result is in this field, I'd like either of two forms to open, all with the same click.
Is this even possible?
Any help would be greatly appreciated.
Tks, Kirsco (first post so let me know if i've done it incorrectly)
I've been working with Access 2003 for a while, but am not so good on the code side of things.
This is the code I want to alter:
Private Sub cmdEdit_Click()
Dim stDocName As String
Dim strFilter As String
Dim stLinkCriteria As String
stDocName = "frm_Results"
strFilter = "Number= '" & Me.Number & "'"
stLinkCriteria = "frm_CIF_To_Be_Actioned"
DoCmd.OpenForm stDocName, acNormal, , strFilter, , , stLinkCriteria
End Sub
Currently on 'Click' opens "frm_Results". What I'm wanting to happen is for a particular form to be opened based on the following:
if Preventative_Reqd = -1, open "frm_ResultsPreventative, otherwise open "frm_results".
Preventative_Reqd is a yes/no field elsewhere on the form. Depending which result is in this field, I'd like either of two forms to open, all with the same click.
Is this even possible?
Any help would be greatly appreciated.
Tks, Kirsco (first post so let me know if i've done it incorrectly)