Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8531705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:32:54+00:00 2026-06-11T09:32:54+00:00

I have made a form in ms-access to get a query output according to

  • 0

I have made a form in ms-access to get a query output according to the form.

The sql in the access query being:

SELECT w.* FROM work_log1 AS w, [task name] AS t WHERE t.task_name=forms!
[Accenture QC]!combo4 And t.task_id=w.task_name And w.activity_start_date Between  
forms ![Accenture QC]!text0 And forms![Accenture QC]!text11 
and w.[TAT] = forms![Accenture QC]!combo46

Now everything is working fine, but i want to remove the last filter line if the combo46 is blank.

I have made the sql somehow like this:

and iif(forms![Accenture QC]!combo46 = '', t.task_id=w.task_name ,
t.task_id=w.task_name   and w.[TAT] = forms![Accenture QC]!combo46)

Is this the right way to do this, what if there was only this TAT filter to be applied?

I mean if how to write something like this:

"SELECT w.* FROM work_log1 AS w where (w.[TAT] = forms![Accenture QC]!combo46 
OR forms![Accenture QC]!combo46 Is Null)" 

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:32:56+00:00Added an answer on June 11, 2026 at 9:32 am

    Currently the last part of your WHERE clause is …

    and w.[TAT] = forms![Accenture QC]!combo46
    

    If your goal is to ignore that constraint on w.[TAT] when combo46 is Null, try this:

    AND (w.[TAT] = forms![Accenture QC]!combo46
        OR forms![Accenture QC]!combo46 Is Null)
    

    This could be less straightforward if “blank” could mean anything other than Null … eg an empty (zero-length) string or space characters. You could capture all those possibilities in one expression.

    Len(Trim(forms![Accenture QC]!combo46 & "")) = 0
    

    In the latest version of your question’s query …

    SELECT w.*
    FROM work_log1 AS w
    where
           w.[TAT] = forms![Accenture QC]!combo46 
        OR Len(Trim(forms![Accenture QC]!combo46 & "")) = 0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a form that accepts query and executes it through php. I
I have made a form validation using ajax post method. But i got the
In my iOS application I have made a form that should submit data into
I have made a custom form in a module where I have used a
I have made a Base Form which is inherited by most Forms in the
I have started using jQuery and rails. I have made a simple form that
I have a form made in JSP, here I have multiple buttons - Approve,
I have made a simple web form in Google app engine where I have
i have made a simple php contact form following this tutorial: http://www.catswhocode.com/blog/how-to-create-a-built-in-contact-form-for-your-wordpress-theme The big
Post-release, I have made one small change to one form in our development site

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.