G
grantschneider
I have a form that I use to run queries and I have 4 different
variables that can either be blank or not. I have tried to create
conditions where I am able to leave some or all blank or some or all
filled in and get the correct results returned. This is the code I am
using and it just doesn't seem to work:
WHERE ([Master Sales Forecast].SVP = [Forms]![ShareComm]![Combo12]
OR [Forms]![ShareComm]![Combo12] IS NULL)
AND ([Master Sales Forecast].VP = [Forms]![ShareComm]![VP]
OR [Forms]![ShareComm]![VP] IS NULL)
AND ([Master Sales Forecast].SC = [Forms]![ShareComm]![SC]
OR [Forms]![ShareComm]![SC] IS NULL);
variables that can either be blank or not. I have tried to create
conditions where I am able to leave some or all blank or some or all
filled in and get the correct results returned. This is the code I am
using and it just doesn't seem to work:
WHERE ([Master Sales Forecast].SVP = [Forms]![ShareComm]![Combo12]
OR [Forms]![ShareComm]![Combo12] IS NULL)
AND ([Master Sales Forecast].VP = [Forms]![ShareComm]![VP]
OR [Forms]![ShareComm]![VP] IS NULL)
AND ([Master Sales Forecast].SC = [Forms]![ShareComm]![SC]
OR [Forms]![ShareComm]![SC] IS NULL);