case statement

  • Thread starter Thread starter souris
  • Start date Start date
S

souris

Does MS Access support case or if statement?
I would like to have my value depends on other field.

Any sample code would be great appreciated,

Souris,
 
Public Function WhatToDo (strUserInput as String) as String
Select Case strUserInput
Case "Whine"
WhatToDo = "Would you like some cheese with that whine?"
Case "Complain", "Threaten"
WhatToDo = "Sorry, not my department."
Case Else
WhatToDo = "Sorry, can't help you."
End Select
End Function

"souris" wrote ...
 

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

Back
Top