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 / New Users / April 2005

Tip: Looking for answers? Try searching our database.

Update query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
peter j - 11 Apr 2005 17:01 GMT
I am a novice at Access: I have an update query that uses two parameters,
which I get the user to supply using a PARAMETERS statement at the start of
the query.  The value from one of these has to be obtained by running another
query (which does a SUM function, so it returns a single row with a single
column, ie just one value) , and this seems a bit naff.  The final SQL would
look at bit like:
UPDATE myTable SET field1=[User value], field2=(SELECT SUM(field3) FROM
myOtherTable) WHERE ...
but this does not work with the embedded query. Can I use the anything in
Access to automate this?  (Oh, and I still use Access97: it does the job, so
we haven't upgraded to anything more modern)
Steve Schapel - 11 Apr 2005 19:12 GMT
Peter,

There are more than one approach to this.  One way is...
 UPDATE myTable SET field1=[User value],
field2=DSum("[field3]","myOtherTable")

Signature

Steve Schapel, Microsoft Access MVP

> I am a novice at Access: I have an update query that uses two parameters,
> which I get the user to supply using a PARAMETERS statement at the start of
[quoted text clipped - 7 lines]
> Access to automate this?  (Oh, and I still use Access97: it does the job, so
> we haven't upgraded to anything more modern)
 
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.