Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 2nd, 2012, 06:19 PM
Registered User
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update Query Using Autonumber Value from List

I have created a button that activates an update query. The update query updates a date field in my database with the NOW date function. The update query's criteria is the ID field from a list I made in a form referencing the same table that the date is in. The ID field is an autonumber.

For some reason, the update query works for any other criteria columns in the list, eg. style number, team, etc. but it will not update if I set the criteria to ID.

Is there some rule in Access that is preventing me from using the ID criteria?

Thanks,

Alex
 
Old March 2nd, 2012, 07:20 PM
Registered User
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update/Solution

The update query will only work for the bound value in the list. My list had several different columns, but the bound value was set to 1, which is the first column, "style #", which is why style number worked and nothing else did. I changed the bound value to 5, the column of my autonumber, and it worked.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Update query doesnt run when Select query does (In MS Access) rmccafferty SQL Language 3 February 11th, 2010 04:54 AM
Retrieve Autonumber field and update it carrie09 Access VBA 3 November 2nd, 2007 07:32 AM
Autonumber Query Brendan Bartley Access 2 July 16th, 2006 02:14 AM
Autonumber in a query crisan Access 2 May 11th, 2005 07:58 AM
Table Autonumber Update chloe Access 7 February 27th, 2004 06:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.