I have a form created from a query Report Recommendations.
On the form there are two field one showing the total recommendations for a report the other identifies what recommendations you are reading. The number changes everytime the user clicks the next record button. I would like to write an IIF statement that compares the value in each field and when they are the same creates a message box (Last recommendation)
Feild1 = REC Total (which contains a static number)
Feild2 = REC Num (which updates the REC number as the user navigates through the recommendations by clicking on the cmb button)
e.g Total REC value 10 when the REC Num displays 10 message box appears
I have got so far but can’t seem to find the code for matching the values
Private Sub Command53_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.Rec Total = (?Matching Value Of?) Me.REC Num then
MsgBox MESSAGE_TEXT, vbExclamation, "Last recommendation"
Cancel = True
End If
End Sub
Any help would be good Thanks Ron
On the form there are two field one showing the total recommendations for a report the other identifies what recommendations you are reading. The number changes everytime the user clicks the next record button. I would like to write an IIF statement that compares the value in each field and when they are the same creates a message box (Last recommendation)
Feild1 = REC Total (which contains a static number)
Feild2 = REC Num (which updates the REC number as the user navigates through the recommendations by clicking on the cmb button)
e.g Total REC value 10 when the REC Num displays 10 message box appears
I have got so far but can’t seem to find the code for matching the values
Private Sub Command53_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.Rec Total = (?Matching Value Of?) Me.REC Num then
MsgBox MESSAGE_TEXT, vbExclamation, "Last recommendation"
Cancel = True
End If
End Sub
Any help would be good Thanks Ron