+ Post New Thread
Results 1 to 8 of 8
Office Software Thread, MS Access query help in Technical; Hi I'm after some help with Access. I have an Inventory database which has a form that shows a detailed ...
  1. #1
    randle's Avatar
    Join Date
    Dec 2006
    Location
    Chelmsford, Essex
    Posts
    594
    Thank Post
    66
    Thanked 16 Times in 15 Posts
    Rep Power
    19

    MS Access query help

    Hi

    I'm after some help with Access.

    I have an Inventory database which has a form that shows a detailed view of each record and have created a query which when executed will change a number of fields to reflect a particular status. I have a field in the query called Inventory ID which obviously links the query to the relevant record in the main table. This field has a criteria of "[ItemID]" but this prompts for the Inventory ID upon execution and don't want this. Leaving it blank changes all records so i'm after the correct criteria entry to make this work only on the open record.

    Any ideas?

  2. #2
    leco's Avatar
    Join Date
    Nov 2006
    Location
    West Yorkshire
    Posts
    2,026
    Thank Post
    595
    Thanked 125 Times in 119 Posts
    Rep Power
    41
    Do you need to state that it is attached to a particular form control and the current value of that control? From memory it's something that includes [Forms]![form-name]![ItemID]

  3. Thanks to leco from:

    randle (9th November 2009)

  4. #3
    randle's Avatar
    Join Date
    Dec 2006
    Location
    Chelmsford, Essex
    Posts
    594
    Thank Post
    66
    Thanked 16 Times in 15 Posts
    Rep Power
    19
    I forgot to mention that I already tried [Forms]![MyForm]![FormField] but have just tried it with ItemID in place of FormField with no effect unfortunately.

    The query doesn't give me any error or feedback so can't see what it's failing on so no help there.

  5. #4
    leco's Avatar
    Join Date
    Nov 2006
    Location
    West Yorkshire
    Posts
    2,026
    Thank Post
    595
    Thanked 125 Times in 119 Posts
    Rep Power
    41
    Could you try an After Update event? You would then be able to watch the process and see which bit was failing.

  6. #5
    randle's Avatar
    Join Date
    Dec 2006
    Location
    Chelmsford, Essex
    Posts
    594
    Thank Post
    66
    Thanked 16 Times in 15 Posts
    Rep Power
    19
    I'm fairly new to Access so not sure how to try this as an "After update event" unfortunately

  7. #6
    leco's Avatar
    Join Date
    Nov 2006
    Location
    West Yorkshire
    Posts
    2,026
    Thank Post
    595
    Thanked 125 Times in 119 Posts
    Rep Power
    41
    Have a look in the Help file for the syntax or you could look at an Update Query. The latter gives you the opportunity to see the resulting changes to be made in the table, before running the actual query.

  8. #7
    randle's Avatar
    Join Date
    Dec 2006
    Location
    Chelmsford, Essex
    Posts
    594
    Thank Post
    66
    Thanked 16 Times in 15 Posts
    Rep Power
    19
    Turns out the query i created was corrupt as created it again with the criteria [Forms]![MyFormName]![FieldName] which now updates the current open record only with the changes specified. Thanks for the help.

  9. #8
    leco's Avatar
    Join Date
    Nov 2006
    Location
    West Yorkshire
    Posts
    2,026
    Thank Post
    595
    Thanked 125 Times in 119 Posts
    Rep Power
    41
    Glad it's worked out for you.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 1
    Last Post: 23rd October 2009, 08:53 AM
  2. Replies: 20
    Last Post: 20th August 2009, 09:40 PM
  3. Access - Date Query
    By garethedmondson in forum Office Software
    Replies: 12
    Last Post: 29th January 2009, 09:14 PM
  4. Vbscript to export query results from MS Access
    By RabbieBurns in forum Scripts
    Replies: 2
    Last Post: 24th June 2008, 11:09 AM
  5. Query of existing query data in PHP
    By markwilliamson2001 in forum Web Development
    Replies: 5
    Last Post: 5th October 2007, 08:43 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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