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!

Filter based on two queries

Status
Not open for further replies.

TaylorTot

Technical User
Dec 23, 2003
96
US
Hello,

I'm new to VB and am trying to accomplish the following logic:

When the end user enters an address and hits the filter button it does the following:

Filter Button Functionality:

Run ActiveAsset_SelQry
If [Ruca_Subclass] = "A" or "B"
Then
Run Get20Mile_SelQry
Where Miles <5
Else
If [Ruca_Subclass] = "C" or "D"
Then
Run Get20Mile_SelQry
Where Miles <25

I am not sure how to write the code for this. Any help would be greatly appreciated.
 
ActiveAsset_SelQry

Sounds like a parameter query that returns one record of one field (Ruca_Subclass) with values A, B, C, D. Depending on that, you execute another parameter query.

Now the question is which library you use ADO or DAO?
 
Thank you for the reply!

I am using DAO for the rest of my project.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top