I have a drop down list of a few fields that populates text boxes on a from that no one
Sees I use these text boxes to populate a criteria field in a query. I am trying then to run the info in the text box through this function but my function is not correct and I cant get it to work. I don’t know if you can put the result right into the criteria query ? Maybe if it references the function. I figured I would put the result in another textbox (Text26) kind of redundant but don’t know know better. This is one version of what I tried running along with a few others that don’t work. Any help would be appreciated.
Public Function textbx26(Text24) As String
Dim strText26 As String
If Text24 = M Then Me!Text26 = "Monday"
ElseIf Text24 = T Then Me!Text26 = "Tuesday"
ElseIf Text24 = W Then Me!Text26 = "Wednesday"
ElseIf Text24 = R Then Me!Text26 = "Thursday"
ElseIf Text24 = F Then Me!Text26 = "Friday"
ElseIf Text24 = S Then Me!Text26 = "Saturday"
ElseIf Text24 = U Then Me!Text26 = "Sunday"
ElseIf Text24 = MW Then Me!Text26 = "Monday" And "Wednesday"
ElseIf Text24 = U Then Me!Text26 = "Tuesday" And "Thursday"
End If
Sees I use these text boxes to populate a criteria field in a query. I am trying then to run the info in the text box through this function but my function is not correct and I cant get it to work. I don’t know if you can put the result right into the criteria query ? Maybe if it references the function. I figured I would put the result in another textbox (Text26) kind of redundant but don’t know know better. This is one version of what I tried running along with a few others that don’t work. Any help would be appreciated.
Public Function textbx26(Text24) As String
Dim strText26 As String
If Text24 = M Then Me!Text26 = "Monday"
ElseIf Text24 = T Then Me!Text26 = "Tuesday"
ElseIf Text24 = W Then Me!Text26 = "Wednesday"
ElseIf Text24 = R Then Me!Text26 = "Thursday"
ElseIf Text24 = F Then Me!Text26 = "Friday"
ElseIf Text24 = S Then Me!Text26 = "Saturday"
ElseIf Text24 = U Then Me!Text26 = "Sunday"
ElseIf Text24 = MW Then Me!Text26 = "Monday" And "Wednesday"
ElseIf Text24 = U Then Me!Text26 = "Tuesday" And "Thursday"
End If