Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a global variable to a query 1

Status
Not open for further replies.

xhuck28x

IS-IT--Management
Nov 25, 2003
12
US
Is this possible...

WHERE PurchaseOrderLineItems.PONumber=Modules!mdlGlobal!gPONumber;

if, so why isn't it working.
 
Hi!

Rather use a userdefined function. In a module (not a forms module), but you could place it where you've declared your public variable:

[tt]Public Function GetgPONumber() as <datatype>
GetgPONumber=gPONumber
End Function[/tt]

Then
&quot;WHERE PurchaseOrderLineItems.PONumber=GetgPONumber()&quot;
should work in the SQL view of the QBE. Substitute <datatype> with datatype of gPONumber.

HTH Roy-Vidar
 
Sorry for the post...I discovered the answer afterwards. But a star anyhow!!!

peace.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top