U
upsman via AccessMonster.com
I have the following code behind a Find button
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Achievement"
stLinkCriteria = "[StudentID]= " & Forms!Achievement.StudentID & " And
[CurrentMonth]= " & Me!CurrMonth.Column(0)
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "AchieveFind"
If no record is found, I'd like to display a msgbox with a message telling
the user this but I'm not sure how or where to code that. What is the
syntax and where in my code would it go?
Thanks,
Rod
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Achievement"
stLinkCriteria = "[StudentID]= " & Forms!Achievement.StudentID & " And
[CurrentMonth]= " & Me!CurrMonth.Column(0)
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "AchieveFind"
If no record is found, I'd like to display a msgbox with a message telling
the user this but I'm not sure how or where to code that. What is the
syntax and where in my code would it go?
Thanks,
Rod