Option Button with "stLinkCriteria" if no criteria how to create a message.

  • Thread starter MAXINE via AccessMonster.com
  • Start date
M

MAXINE via AccessMonster.com

I am using the code below on [Event Procedure]of the option Buttons. This
opens my form correctly BUT it also opens a blank form when No job number
matches the criteria. Is there a way I can create a message box to show
there is know match.

Private Sub Value_Click()
Select Case Me!Value
Case 1
stDocName = "1 master cis"
stLinkCriteria = "[job number]=" & Me![Job Number]
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
Case 2
stDocName = "1 master cis"
stLinkCriteria = "[job number]=" & Me![Job Number]
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
Case 3
stDocName = "1 master cis"
stLinkCriteria = "[job number]=" & Me![Job Number]
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
Case Else
strFilterSQL = strSQL & ";"
End Select
End Sub


Thanks

Max
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top