query in macro with special requierment in result

  • Thread starter Thread starter berick
  • Start date Start date
B

berick

Hi there,

I got a problem.... as probably everyone who posts here :)

I have a query which is dynamicly done in a macro which works fine. But
my problem is that in the table where I look up the information there
is one line which I always need in my result.

Who can I make that this line always apear?

Short Info about the table.

I have 3 fields:

person code
person name
and section code

the person code is 2 digits where the first one is the section code and
the second one the actual code from the person.

Now in my query I search for persons of a specific section for example
section A. So now all persons show up which are in section A so person
code A* but I also need the first line of the table where all 3 fields
are set to ALL so that I can after selecting a specific person go back
and look at all persons in this section.

I hope you understand what I mean.

Kind regards
Benjamin Stossel
Purchasing Administrator
Toyota Brussels
 
Now in my query I search for persons of a specific section for example
section A. So now all persons show up which are in section A so person
code A* but I also need the first line of the table where all 3 fields
are set to ALL so that I can after selecting a specific person go back
and look at all persons in this section.

Use a criterion such as

LIKE "A*" OR ([person code] = "ALL" AND [person name] = "ALL" AND
[section code] = "ALL")

John W. Vinson[MVP]
 
First sorry that I used my private email Adress, I know I should use
the one from my office.

Second:

Thanks very much John. Works perfect your suggestion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top