randle Posted November 6, 2009 Posted November 6, 2009 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?
leco Posted November 6, 2009 Posted November 6, 2009 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] 1
randle Posted November 6, 2009 Author Posted November 6, 2009 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.
leco Posted November 6, 2009 Posted November 6, 2009 Could you try an After Update event? You would then be able to watch the process and see which bit was failing.
randle Posted November 6, 2009 Author Posted November 6, 2009 I'm fairly new to Access so not sure how to try this as an "After update event" unfortunately
leco Posted November 6, 2009 Posted November 6, 2009 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.
randle Posted November 9, 2009 Author Posted November 9, 2009 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now