Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013

    Thumbs up Unanswered: Creating a pricing database

    Hello everyone,
    Im new to access and Im learning as I go. Im now stuck onthe pricing section of my project.

    I'm working on a project were the price is based on square feet and service term.

    I have tried this but it doesnt work: =IIf([SqareFeet]>1000<1500,and [ServiceTermID]=Initial,"$100")

    Service terms include: Monthly, Bimonthly, Biweekly, Quarterly and twice a year

    Square feet brackets are: 1000 - 1500, 1501 - 2000, 2001-2500, 2501-3000, 3001-3500, 3501-4000, 4001-4500, 4501-5000, 5001-5500, 5501-6000 and 6001-6500

    If anyone can guide me in the right direction I will really appreciated.

  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    First off, you can't use code like


    in VBA; actually, I know of no programming language where this would work, although I could be wrong! You have to use

    [SqareFeet]>1000 and [SqareFeet]<1500

    Also make sure that the spelling of your Field is correct; Access is unforgiving when it comes to things like this! Is it really


    or should it be

    [SquareFeet] ?

    Also, with eleven possible ranges for square footage, you'll have to nest your IIFs to include them all, and that usually ends up being a hairball! You appear to be planning to use this in the Control Source for your cost Control; I'd move the assignment of the cost to the AfterUpdate event of the Control where you actually enter the square footage, and use the Select Case construct, rather than using If...Then...Else, to do the testing and Value assignment.

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts