Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

RE: Subject: Subquery in a textbox's control source

Discussion in 'Information Technology' started by George, Oct 26, 2005.

  1. George

    George
    Expand Collapse
    Guest

    Many thanks for your reply Ofer.

    Thanks for explaining how this query would work using the dLookup function.
    I'll mark your post as answered when I get home. This work pc is locked down
    and I can't use activeX. My original sql and the DLookup that solved the
    problem are noted below:

    SELECT payScale.psPayment, payScale.psLower, payScale.psUpper
    FROM payScale
    WHERE (((payScale.psLower)<SumOfAmount) AND ((payScale.psUpper)>SumOfAmount));

    =DLookUp("[psPayment]","payScale","[psLower] < " &
    Reports!transfersAwaitingPayment!SumOfAmount & " and [psUpper] > " &
    Reports!transfersAwaitingPayment!SumOfAmount)


    George


    "Ofer" wrote:

    > Try this
    >
    > =DLookUp("commissionAmount","payScale","lowerLimit > " & [myVariableValue] &
    > " and upperLimit < " & [myVariableValue])
    > --
    > If I answered your question, please mark it as an answer. That way, it will
    > stay saved for a longer time, so other can benifit from it.
    >
    > Good luck
    >
    >
    >
    > "George" wrote:
    >
    > > Hi Folks, hope someone can help.
    > >
    > > Based on a value on a report (eg £10,000) I want to Identify the amount of
    > > comission to pay to an adviser. EG, if the value is 10,000, commision = 50;
    > > 15,000 then commision = 75 etc. DLookup will not work (I don't think) as I
    > > need to test against two values. My SQL looks a bit like this:
    > >
    > > SELECT commissionAmount
    > > FROM payScale
    > > WHERE lowerLimit>[myVariableValue] and upperLimit<[myVariableValue]
    > >
    > > Hope that makes a bit of sense!
    > >
    > > George
    > >
    > >
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Sikh Women Group on Motorway Inferno Subjected to Racist Abuse Breaking News Aug 4, 2009
    Topical subjects in the SGGS Discourses in English Dec 16, 2006
    God-Subjective & Objective view points Spiritual Articles Jan 29, 2006
    SSC examinees fare poorly in secular subjects (News From Bangladesh) Interfaith Dialogues Jul 15, 2005

Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page