Hello to all,
I have been searching these threads all afternoon, but can't find anything that comes close to what I need. I feel its a simple solution but just can't figure it out.
Here's the situation:
I have a form (frmViewOrphans) that has a combo box on it (cboSponsoredStatus). When an item is selected in cboSponsoredStatus, the value is placed in an unbound textbox (txtSponsoredStatus). Once a status is selected then an 'Open' button is clicked to open another form (frmOrphans) that is based on a query (qryView). qryView is looking at txtSponsoredStatus for its value to filter the records.
I need in VBA coding to pass a Is Null or Is Not Null value to the query criteria. Here is the code that I have so far:
But using Is Not Null or Is Null does not work. What do I have to use to obtain the result I am looking for? Using Is Not Null or Is Null in the acutal query works but it doesn't work in VBA...?????
Thanks in advance!!!!
I have been searching these threads all afternoon, but can't find anything that comes close to what I need. I feel its a simple solution but just can't figure it out.
Here's the situation:
I have a form (frmViewOrphans) that has a combo box on it (cboSponsoredStatus). When an item is selected in cboSponsoredStatus, the value is placed in an unbound textbox (txtSponsoredStatus). Once a status is selected then an 'Open' button is clicked to open another form (frmOrphans) that is based on a query (qryView). qryView is looking at txtSponsoredStatus for its value to filter the records.
I need in VBA coding to pass a Is Null or Is Not Null value to the query criteria. Here is the code that I have so far:
Code:
If Me.cboSponsoredStatus = "Sponsored" Then
Me.txtSponsoredStatus = [b]Is Not Null[/b]
Else
If Me.cboSponsoredStatus = "Unsponsored" Then
Me.txtSponsoredStatus.Value = [b]Is Null[/b]
End If
End If
Thanks in advance!!!!