How to Create a Form Based on an Update Query

S

Steve

Obviously forms can be based on select queries but can they built on Update
Queries?

If so, can some one please give me guidance?

Any help is appreciated.
 
R

Randy

Steve said:
Obviously forms can be based on select queries but can they built on
Update
Queries?

If so, can some one please give me guidance?

Any help is appreciated.

Steve,

A Form using an update-query as a source is not a concept. A Form, by its
nature, "updates" the records of the query that it is based-on. That is by
modifying the fields (textboxes) of the form. However you can call an
external update-query from a Form, by placing a button on the Form to
trigger an Update query on other table. The button can be based on something
like this:

DoCmd.RunSQL "UPDATE Table SET Field = NewValue"
or
DoCmd.OpenQuery "qryMyUpdateQuery"

Is that what you were looking for?

-Randy
 
N

Nick Coe \(UK\)

Steve said:
Obviously forms can be based on select queries but can
they built on
Update Queries?

If so, can some one please give me guidance?

Any help is appreciated.

As Bruce so cogently put it... No.

You cannot normally view the output of an action query.
But, you could simulate what _will_ be updated, deleted,
inserted and so on with a select query as a form's record
source, ask if the user wants to continue then run the
update or not as the case may be.

Bear in mind that an update query will, under some
circumstances, insert rows aswell as alter some.

--
Nick Coe (UK)
AccHelp v1.01 Access Application Help File Builder
http://www.alphacos.co.uk/
Download Free Copy
----
 
J

John Vinson

Could you describe such a circumstance?

Updating an Outer Join query. It's actually a pretty slick way to do a
simultaneous append and update. Updating the null fields in the
nonexistant joined records on the outer join side will add new records
to that table.

You'ld pretty much need to be intending to do it, though!

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
B

Bruce M. Thompson

Bear in mind that an update query will, under some circumstances, insert
Updating an Outer Join query. It's actually a pretty slick way to do a
simultaneous append and update. Updating the null fields in the
nonexistant joined records on the outer join side will add new records
to that table.

You'ld pretty much need to be intending to do it, though!

Thanks, John. I can see where that might be useful. :)
 
B

Bruce M. Thompson

Bear in mind that an update query will, under some circumstances,
Thanks for the link, Nick. I had never thought of that. <s>
 
Top