A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IsLoaded



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2004, 07:10 PM
Maureen
external usenet poster
 
Posts: n/a
Default IsLoaded

I have copied the IsLoaded module from the Northwind DB
into my own DB. I have successfully used this code in a
macro condition.

Can I use the IsLoaded function within the criteria of a
query?

I am trying to set the criteria of a query to equal a
certain field of another open form -depending on which of
two forms will be open. The expression is accepted (so
no typos in creating the expression syntax) but when I
try to run the query I get a message that the ISLOADED
function is not recognized.

My criteria in the query is as follows:

=IIf(IsLoaded([Forms]![tblInquiry1]),[Forms]!
[tblInquiry1]![CompanyID],IIf(IsLoaded([Forms]![Company
and Contacts]),[Forms]![Company and Contacts]!
[CompanyID]," "))


Can you help me?

  #2  
Old May 29th, 2004, 04:28 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default IsLoaded

Yes but you need to pass to it simply the Form name as a String rather than
the Form object.

Try:

=IIf(IsLoaded("[tblInquiry1]"),[Forms]![tblInquiry1]![CompanyID],
IIf(IsLoaded("[Company and Contacts]"),
[Forms]![Company and Contacts]![CompanyID],""))

--
HTH
Van T. Dinh
MVP (Access)



"Maureen" wrote in message
...
I have copied the IsLoaded module from the Northwind DB
into my own DB. I have successfully used this code in a
macro condition.

Can I use the IsLoaded function within the criteria of a
query?

I am trying to set the criteria of a query to equal a
certain field of another open form -depending on which of
two forms will be open. The expression is accepted (so
no typos in creating the expression syntax) but when I
try to run the query I get a message that the ISLOADED
function is not recognized.

My criteria in the query is as follows:

=IIf(IsLoaded([Forms]![tblInquiry1]),[Forms]!
[tblInquiry1]![CompanyID],IIf(IsLoaded([Forms]![Company
and Contacts]),[Forms]![Company and Contacts]!
[CompanyID]," "))


Can you help me?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.