Run update query

  • Thread starter Thread starter Dawn
  • Start date Start date
D

Dawn

I want to run my update query on exit within a form. It
has too many characters to set it up easily. Can you
help. See below SQL for the update query.

UPDATE [Programs Tbl] INNER JOIN ([Quote Tracking Tbl]
INNER JOIN [Program Cost Summary] ON [Quote Tracking Tbl].
[Program ID] = [Program Cost Summary].[Program ID]) ON
[Programs Tbl].[Program ID] = [Program Cost Summary].
[Program ID] SET [Program Cost Summary].[Piece Price] =
[Quote Tracking Tbl].[Piece Price], [Program Cost
Summary].Volume = [Programs Tbl].[Volume]
WHERE ((([Quote Tracking Tbl].[Most Recent])=Yes));

Thanks
 
Dawn,

What problem are you experiencing with this query? It looks ok to me.

--
Steve Schapel, Microsoft Access MVP

I want to run my update query on exit within a form. It
has too many characters to set it up easily. Can you
help. See below SQL for the update query.

UPDATE [Programs Tbl] INNER JOIN ([Quote Tracking Tbl]
INNER JOIN [Program Cost Summary] ON [Quote Tracking Tbl].
[Program ID] = [Program Cost Summary].[Program ID]) ON
[Programs Tbl].[Program ID] = [Program Cost Summary].
[Program ID] SET [Program Cost Summary].[Piece Price] =
[Quote Tracking Tbl].[Piece Price], [Program Cost
Summary].Volume = [Programs Tbl].[Volume]
WHERE ((([Quote Tracking Tbl].[Most Recent])=Yes));

Thanks
 
When using RunCommand as my action I get an error telling
me text cannot be edited. I do not know what to place it
within the form SQL format.
-----Original Message-----
Dawn,

What problem are you experiencing with this query? It looks ok to me.

--
Steve Schapel, Microsoft Access MVP

I want to run my update query on exit within a form. It
has too many characters to set it up easily. Can you
help. See below SQL for the update query.

UPDATE [Programs Tbl] INNER JOIN ([Quote Tracking Tbl]
INNER JOIN [Program Cost Summary] ON [Quote Tracking Tbl].
[Program ID] = [Program Cost Summary].[Program ID]) ON
[Programs Tbl].[Program ID] = [Program Cost Summary].
[Program ID] SET [Program Cost Summary].[Piece Price] =
[Quote Tracking Tbl].[Piece Price], [Program Cost
Summary].Volume = [Programs Tbl].[Volume]
WHERE ((([Quote Tracking Tbl].[Most Recent])=Yes));

Thanks
.
 
Dawn,

Are you sure? I have never seen the "text cannot be edited" error
message in Access.

What happens if you try to just run the query as an Update Query? Does
it work ok? If not, please post back and let us know exactly what
happens. If it does work, then just use an OpenQuery action to run it
from a macro.
 
I am not sure of your set up but perhaps you need to use RunSQL action
rather than RunCommand action. RunCommand action is used to run VBA code,
not an SQL String.

Also, if [Most Recent] is a Boolean Field then use True instead of Yes. I
am not sure whether Yes is acceptable by JET.
 
Back
Top