The Condition in a Macro

G

Guest

I am having troubles with the Condition in a Macro such as the following:

[Files_Topics Query1]![displayfile1]="underwater_1"

I have included many of them besides many "OutputTo" Macros so that I would
be able to update data or the format and output all the documents in no time.
.. . . But it is taking for ever to get it done :-(

Apart from the QUERY!FIELD="DATA" example that is shown above, I can not
find on this web site another solution.

If you could help please do so. Pretty please! :)
 
G

Guest

bert32hid said:
Apart from the QUERY!FIELD="DATA" example that is shown above, I can not
find on this web site another solution.

LET ME correct myself..... I am not after "ANOTHER" solution.... I am
after "A" solution, as that which is shown does NOT work..... Sorry, if it
mislead you at all....
 
K

Ken Snell [MVP]

Are you wanting to read the value from a query's record? If yes, use the
DLookup function instead (your syntax will not work to find a query):

DLookup("displayfile1", "Files_Topics Query1")="underwater_1"


If you want to read the value from a control on an open form, your syntax is
close but not right:

Forms![Files_Topics Query1]![displayfile1]="underwater_1"
 
G

Guest

The this is it is not a for, it is a Table / Query..... And I have had
trouble getting it across to be part of the Macro.

Now with your DLookup, for some reason, it has every single record, which
this function was supposed to get out (wasn't it?).


Ken Snell said:
Are you wanting to read the value from a query's record? If yes, use the
DLookup function instead (your syntax will not work to find a query):

DLookup("displayfile1", "Files_Topics Query1")="underwater_1"


If you want to read the value from a control on an open form, your syntax is
close but not right:

Forms![Files_Topics Query1]![displayfile1]="underwater_1"

--

Ken Snell
<MS ACCESS MVP>


bert32hid said:
I am having troubles with the Condition in a Macro such as the following:

[Files_Topics Query1]![displayfile1]="underwater_1"

I have included many of them besides many "OutputTo" Macros so that I
would
be able to update data or the format and output all the documents in no
time.
. . . But it is taking for ever to get it done :-(

Apart from the QUERY!FIELD="DATA" example that is shown above, I can not
find on this web site another solution.

If you could help please do so. Pretty please! :)
 
K

Ken Snell [MVP]

The DLookup is not going to filter anything... you asked about using a
Condition expression, which is what I suggested. If you're wanting to filter
a report or form, then tell us more information about what you're actually
trying to do. Details help....
--

Ken Snell
<MS ACCESS MVP>



bert32hid said:
The this is it is not a for, it is a Table / Query..... And I have had
trouble getting it across to be part of the Macro.

Now with your DLookup, for some reason, it has every single record, which
this function was supposed to get out (wasn't it?).


Ken Snell said:
Are you wanting to read the value from a query's record? If yes, use the
DLookup function instead (your syntax will not work to find a query):

DLookup("displayfile1", "Files_Topics Query1")="underwater_1"


If you want to read the value from a control on an open form, your syntax
is
close but not right:

Forms![Files_Topics Query1]![displayfile1]="underwater_1"

--

Ken Snell
<MS ACCESS MVP>


bert32hid said:
I am having troubles with the Condition in a Macro such as the
following:

[Files_Topics Query1]![displayfile1]="underwater_1"

I have included many of them besides many "OutputTo" Macros so that I
would
be able to update data or the format and output all the documents in no
time.
. . . But it is taking for ever to get it done :-(

Apart from the QUERY!FIELD="DATA" example that is shown above, I can
not
find on this web site another solution.

If you could help please do so. Pretty please! :)
 
G

Guest

Great appologies, thanks for your attempt when you did not have then needed
information.

Ken Snell said:
The DLookup is not going to filter anything... you asked about using a
Condition expression, which is what I suggested. If you're wanting to filter
a report or form, then tell us more information about what you're actually
trying to do. Details help....
--

Ken Snell
<MS ACCESS MVP>



bert32hid said:
The this is it is not a for, it is a Table / Query..... And I have had
trouble getting it across to be part of the Macro.

Now with your DLookup, for some reason, it has every single record, which
this function was supposed to get out (wasn't it?).


Ken Snell said:
Are you wanting to read the value from a query's record? If yes, use the
DLookup function instead (your syntax will not work to find a query):

DLookup("displayfile1", "Files_Topics Query1")="underwater_1"


If you want to read the value from a control on an open form, your syntax
is
close but not right:

Forms![Files_Topics Query1]![displayfile1]="underwater_1"

--

Ken Snell
<MS ACCESS MVP>


I am having troubles with the Condition in a Macro such as the
following:

[Files_Topics Query1]![displayfile1]="underwater_1"

I have included many of them besides many "OutputTo" Macros so that I
would
be able to update data or the format and output all the documents in no
time.
. . . But it is taking for ever to get it done :-(

Apart from the QUERY!FIELD="DATA" example that is shown above, I can
not
find on this web site another solution.

If you could help please do so. Pretty please! :)
 

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

Top