Results 1 to 2 of 2
  1. #1
    natonstan is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2014
    Posts
    37

    Conversion Query?


    I'll try and describe this as clearly as I can, basically I have a table that contains a range of Electronic components, as well as their weight and size, basically I have a query that lists items that are over a certain height and weight, now my only problem is that this table isn't in a single format, some parts will say '3 feet' some will say 3' and some 3 feet, I'm trying to make a macro that would convert it into a format and then display it if it's over a specific weight/height.. as of right now i'm stumped so I would be very grateful if anyone can help.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Make it a number field instead of text and only numbers can be entered and this issue would be avoided.

    Are you saying those apostrophes might actually be entered into the data as '3 feet'? Any other characters that might precede the number?

    Try something like:

    SELECT * FROM table WHERE Val(Replace([fieldname],"'","")) > 3;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Date Conversion through Update Query
    By Steven.Allman in forum Queries
    Replies: 8
    Last Post: 01-30-2013, 01:38 PM
  2. Replies: 8
    Last Post: 08-09-2012, 07:04 PM
  3. Replies: 1
    Last Post: 07-31-2012, 02:03 PM
  4. Replies: 6
    Last Post: 06-14-2012, 03:39 PM
  5. Data Type Conversion in Query
    By EHittner in forum Queries
    Replies: 3
    Last Post: 04-14-2010, 02:11 PM

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