Unanswered: Access function return wildcard character
I am working in Access. I have a combobox that gets its row source from a query. next to it is a togglebutton.
In a table, I have a field called 'ID' that only stores numeric data.
The query for the combobox has three fields, one of which is 'ID'. I need to set this up so that if the togglebutton is off, the criteria for the ID field is '10', but if the togglebutton is on, the criteria for the 'ID' field is all numbers, which I am guessing is "*".
I have added a function for the 'ID' field criteria, but when I run it, when the toggle button is 'off', I get the correct results, but when it is 'on' (searching for "*") I get nothing. I do have the combobox.requery working.
My function looks like this: (togAdministrator is my toggle button)
If Forms.frmclassdetails.togAdministrator.Value = -1 Then
ReturnIDNumber = "*"
ReturnIDNumber = 10
Can anyone help me and tell me what I am doing wrong?