I have a table with the following fields: client, project number, project manager, project manager email
I have a form with text fields for each field of the table and I want to have a query run when the user presses a button on the form. How to i make the query only pick the data from the fields that the user entered information into?

for example:
client: AAAA
project number: <null>
project manager: EFudd

I want the query to only pull information that matches the fields that are populated by the user

Re: Run query in Microsoft Access 2013 on only non-empty form fields 80 80

how about SELECT * from table where projectNumber is not NULL

Re: Run query in Microsoft Access 2013 on only non-empty form fields 80 80

I'm sorry maybe I didnt explain it well enough.

With this example,

client: AAAA
project number: <null>
project manager: EFudd

I only want the result to return any project that has client AAAA and project manaher EFudd.

Re: Run query in Microsoft Access 2013 on only non-empty form fields 80 80

That is still a very simple select statement as I posted earlier, just add the columns you want to the where clause.

WHERE client is not null and project manager is not null

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.