Results 1 to 3 of 3
  1. #1
    warriner is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    2

    What type of query do I need?

    Apologies - I bet this has been asked 100 times before. I'm an Access beginner and have been asked by my boss to create an Access database. I have 2 tables: one of data relating to individual locations and the other which is an order form datasheet. It's a bit like this:

    Table A
    Code Item Quantity Route Stop
    000ABC LABELS 1
    001DEF BAGS 3
    002GHI TAPE 1



    The route and stop column are blank as I would like to feed this information, using the 'Code' from my second table which looks a bit like this:

    Table B
    Code Route Stop
    000ABC 1003 23
    001DEF 1027 12
    002GHI 1074 28

    Essentially, when I create a new record, I want to enter the 'Code' in Table A and the Route & Stop automatically pull from Table B.

    I tried using a lookup field which has all of the info in the dropdown, but then when I select it, it only records the code, not the route and stop.

    I tried append but this created new records containing the route and stop - I didn't seem to be able to get this to work.

    Please can somebody explain exactly how I can do this? You may need to dumb it down a little!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    An UPDATE query.
    in a query bring in both tables, join on CODE field.

    update tblA.Route to tblB.Route
    and same with STOP

  3. #3
    warriner is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    2
    Quote Originally Posted by ranman256 View Post
    An UPDATE query.
    in a query bring in both tables, join on CODE field.

    update tblA.Route to tblB.Route
    and same with STOP
    Do I need to put anything special in the ‘update to’ row or just tblA.Route for example? Square brackets or anything?

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

Similar Threads

  1. Replies: 0
    Last Post: 09-05-2017, 10:35 AM
  2. Replies: 4
    Last Post: 02-03-2017, 12:12 PM
  3. Replies: 14
    Last Post: 05-08-2014, 12:51 PM
  4. Replies: 3
    Last Post: 05-31-2013, 04:32 PM
  5. Replies: 2
    Last Post: 03-18-2010, 08:24 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