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 / Queries / April 2006

Tip: Looking for answers? Try searching our database.

Update to Box in update query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
troy - 28 Apr 2006 23:33 GMT
Can someone explain the grid on the update query.

Does it go like this..

1. field: what field you want updated
2. Table: The table from #1 (above) field
3. Update 2: In my case I have 14 fields I want updated if a user update any
one of the fileds I have in my query. Would each one look like this?
[DEV_dbo_TblProduct].[FormId] where the "DEV_dbo_tblProducts"and ".[FormId]"
would be the same as #1 and #2 above?
Criteria: I would like to put the crteria as if anything is typed in new
into the tables. When I run the query it would update my table named:
DEV_dbo_TblProduct from #2 and #3 above. Would this cretreia work under each
field? <>([dbo_tblProduct].[productid]) Thank you in advance and I almost
have it!
Gary Walter - 30 Apr 2006 15:55 GMT
> Can someone explain the grid on the update query.
>
[quoted text clipped - 14 lines]
> field? <>([dbo_tblProduct].[productid]) Thank you in advance and I almost
> have it!

I don't have a suggestion, but just
by providing a response, I'm sure
someone will read this.
Gary Walter - 30 Apr 2006 18:40 GMT
>> Can someone explain the grid on the update query.
>>
[quoted text clipped - 14 lines]
>> field? <>([dbo_tblProduct].[productid]) Thank you in advance and I almost
>> have it!

Hi Troy,

It appears you have 2 tables

1) dbo_tblProduct

  which is possibly a link to a SQL table?

2) DEV_dbo_TblProduct

  possibly a local Access table that shares
  14 fields in common with to the first table

and you would like to update the 14 fields
in DEV_dbo_TblProduct to the current
values of the corresponding fields in dbo_tblProduct?

Is the above correct?

If so, is there a field (or fields) that they share in
common that determines a distinct row in each
table, and a distinct row match between tables?

I might start the update query with a simple SELECT
query where you join the 2 tables on those fields,
then bring down the 14 fields from each table,
and in Criteria row under DEV_dbo_TblProduct
fields, type in as you said

Field:   field1
Table:  DEV_dbo_TblProduct
Sort:
Show: <checked>
Criteria: <> dbo_tblProduct.correspondingfield1
Or:

Once verified that SELECT query is returning
correct records to be updated (and you can see
field values from both fields to check), then
delete the fields from dbo_tblProduct from grid,
change your query to an Update query, and
fill in Update To: row under remaining "DEV" fields in grid.

Field:   field1
Table:  DEV_dbo_TblProduct
Update To: dbo_tblProduct.correspondingfield1
Criteria: <> dbo_tblProduct.correspondingfield1
Or:

Actually, on many occasions, if fields share
same names, Access will do a pretty good
job filling them in with best guess from the join
when you change to Update query.

good luck,

gary
Gary Walter - 30 Apr 2006 18:51 GMT
Hi Troy,

the important thing is that you *OR*
all the criteria

Field:   f1                f2         f3       f4
Table:  t1                t1         t1       t1
Update To: t2.f1     t2.f2    t2.f3    t2.f4
Criteria: <> t2.f1
Or:                      <>t2.f2
Or:                                 <>t2.f3
Or:                                             <>t2.f4

"Gary Walter"wrote
>>> Can someone explain the grid on the update query.
>>>
[quoted text clipped - 73 lines]
>
> gary
 
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.