Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2007

Tip: Looking for answers? Try searching our database.

Updating a field in a table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Norma.Caskey@gmail.com - 28 Feb 2007 21:03 GMT
I am trying to figure out how to update a field in a table ONLY if it
matches a criteria.

In this example, I have a sales opportunity (with a unique
identifier).  Each month we pull the sales report which has the
Opportunity # and the associated sales document number (quote, order
or invoice number).

I'd like to be able to import an Excel spreadsheet to append the table
with the latest sales document number.  If the spreadsheet has the
same opportunity number and the sales document number has been
updated, I want to update that field in the table.

In theory it sounds easy but it completely escapes me!

Any help you can give me is greatly appreciated!

Norma
chris.nebinger@gmail.com - 28 Feb 2007 23:33 GMT
Easiest way is two steps:  (well, 3 if you count setting up the
index).

Create a unique index on opportunity number to not allow more than one
number.
Then, Run an Update query to update the fields in the table from the
spreadsheet.  This will only affect ones that are in both tables.
Next, run an Append query to add all records from the spreadsheet into
the table.  Because it will try to append opportunity numbers that are
already there, some records will fail.  The rest will be added.

And you're done!

Chris

On Feb 28, 2:03 pm, Norma.Cas...@gmail.com wrote:
> I am trying to figure out how to update a field in a table ONLY if it
> matches a criteria.
[quoted text clipped - 14 lines]
>
> Norma
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.