Results 1 to 7 of 7
  1. #1
    Pippo is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    2

    Check if Wooden Box exist for an Item

    In Table1 I have general information and cost about each singular Item, so I wanna import some information from Table2 where I have Box information and cost

    I have table 1 with ItemNumber , Diameter and Lengh , BoxType1, BoxCost1


    Table 2 BoxDiameter and BoxLengh, BoxType, BoxCost
    How can I associated to find if exist a box for some Items ?
    If Forms!Box!BoxLengh * 5 / 100 >= me.Diameter Then
    If Forms!Box!BoxLengh >= Me.Lengh Then
    Me.BoxType1 = Forms!Box!BoxType
    Me.BoxCost1 = Forms!Scatole!BoxCost
    End If
    End If

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    bit confused - you want data from table2, but your code references a form

    Also your formula will bring back all boxes over the size, not just one

    Suggest provide some example data and the required result

  3. #3
    Pippo is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    2
    Yes I have a Form with data from Table1 , then I'd like import some data from Table2

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Pippo, way too confusing. You talk about 2 forms and 2 tables with not much to distinguish what each is all about.
    Some images would help, but best of all post the DB.

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    I agree - I asked for some example data

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Pippo,

    Your requirement is not clear. Please step back and describe what you are dealing with in simple, plain English. You are telling us how you have set up something without any context.
    If you were to hire someone to "build a solution", that person would want to know more about what you are trying to do.
    More info and example(s) required.
    Good luck with your project.

    If English is not your native language, then write your description in your native language, then using Google translate convert your description to English and post.
    Last edited by orange; 01-21-2020 at 03:10 PM.

  7. #7
    TommyK is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    28
    It would appear that your boxes are actually tubes with a diameter and length. Diameter would indicate that it is round, much like a hat box or shipping tube. You also seem to be struggling with translating your request into English. You also reference a 'wooden' box in your title. I've never seen a tubular, wooden box. Square boxes have a length, width and height. Pre-made, ready to use boxes of this sort are usually made of corrugated cardboard, or paper, but could be made of wood or other material.

    Having said that, assuming you have a cylinder or round bar shaped item, if you know the diameter and length of your item, you should be able to query your box inventory for a box which has a diameter >= to the item's diameter AND a length which is >= to your item's length. This should be very simple.

    If, however, you actually are looking for a box with a bottom, four sides, and a top, the sides of which are rectangular in shape, you have a challenge. If, you do a comparative search on a length (l) field, width (w) field, and height (h) field for box values which are >= to the comparable dimensions on your item, then if your item, in your database is 10 x 8 x 6, and you have a box which is 8 x 6 x 10, your search will come up empty, as all three of your individual dimensions will not match up. Even though an astute shipping department can see that your part will fit into the box, the computer cannot deduce this. This is an interesting problem.

    If your firm instituted a policy that all boxes would be sized from the dimensions l, w, h, from longest to shortest, and do the same for the item dimensions in both tables, this would simplify the search.
    Last edited by TommyK; 01-21-2020 at 10:46 AM. Reason: clarify

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

Similar Threads

  1. Replies: 11
    Last Post: 02-02-2019, 11:54 PM
  2. check if column exist
    By xopherira in forum Modules
    Replies: 5
    Last Post: 08-25-2015, 02:09 PM
  3. Check if record exist
    By sahand in forum Forms
    Replies: 2
    Last Post: 06-11-2014, 07:07 AM
  4. Check if record exist
    By khhess in forum Programming
    Replies: 1
    Last Post: 06-14-2011, 06:56 PM
  5. Check if value exist in a table
    By Lucas83 in forum Programming
    Replies: 2
    Last Post: 06-02-2010, 11:42 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