Results 1 to 6 of 6
  1. #1
    gaker10 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    262

    Numerical Wildcard in an Access table

    I have a table which tracks material quotes. I have two fields for the quantity range called PriceBreakBegin and PriceBreakEnd. If I have a part that has contract pricing (no limit on the PriceBreakEnd), can I use a wildcard or something in the PriceBreakEnd field to represent any number, and not just the highest integer I can put in there like 99999?

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    If the field is a numeric type, then no. Numeric types can only accept the digits 0-9, +/-, or the decimal for data entry.

    Could you enter a special value in the field, say 0 or -1?

  3. #3
    gaker10 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    262
    I suppose I could, but I have queries which match P/Ns and take the P/N qty and finds a record in my database in which that qty falls between PriceBreakBegin and PriceBreakEnd. How do I use -1 to really mean infinity so that my queries still work? For example, I want to find Part1's price with a quantity of 35. There's a record in my database for Part1 with a PriceBreakBegin of 1 and a PriceBreakEnd of -1 (infinity in my case). How would I adjust my query to return this result since it applies to my input?

  4. #4
    gaker10 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    262
    An "Or" criteria?

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Something like:

    (PriceBreakEnd < 0 AND (Quantity >= PriceBreakBegin)) OR (Quantity between PriceBreakBegin and PriceBreakEnd)

    might work as criteria.

  6. #6
    gaker10 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    262
    Sounds good to me. I just re-designed my source tables so I will try this when I get to the queries. Thank you!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 12-05-2013, 11:48 AM
  2. Replies: 3
    Last Post: 10-15-2012, 01:18 PM
  3. Replies: 1
    Last Post: 08-13-2012, 03:38 PM
  4. Numerical Issues
    By kwooten in forum Queries
    Replies: 3
    Last Post: 01-10-2012, 01:15 PM
  5. Replies: 1
    Last Post: 05-23-2011, 02:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums