SaveRecord , RunCommand

  • Thread starter Thread starter Anand Gondhiya
  • Start date Start date
A

Anand Gondhiya

Hello Everybody,
I am working on the Access application which already
has Macros created and I am trying to understand.
One of the Actions is "RunCommand". (You can do the
similar thing in the VBA code also ,but here we have
Macros). Now this "RunCommand" Action corelates to the
specific command "SaveRecord". This "SaveRecord" is also
given by the Access.
This macro gets executed when user presses "save"
button.
My question is How would this "SaveRecord" command
(i.e,Action Argument) will save the record ? Where is the
query ? where is the Database table information ?

Could anybody give me some details ?

Thanks a lot
-Anand.
 
You would have to run this from someplace. You would have a record open
when running this macro and it would simply save the record. There is no
need to tell it where to save it since you did that before running the
macro. In other words, you could not simply open Access and run this macro.
Nothing would happen or you'd get an error. You must have a table open
first.

Rick B
 
Most forms have a record source (either a table or query) and you can
find/set it by viewing the form's properties (data tab). Single type forms
show one record at a time, so the SaveRecord command will save the values
from the form's bound controls to the under-lying table/query. Besides your
explicit "Save" button action, Access has its own opportunistic save
function that saves the current record(s) whenever the user moves to another
record and/or closes the form.
-Ed
 
Dear All
I have somewhat similar problem.
I want to update few data from "FORM A" to related TABLE
A's control source
but not all data before I hit the next record selector
button on the record selector navigation button placed
automatically by Access on every form. I want to do this
because a "QUERY A" is based on "TABLE A" and I want to
display partial data with a "FORM B"(QBF TYPE FORM) based
on a "Query A" which get its required data from the "TABLE
A" which must show partial data before I click next record
navigation button which offcourse update all data that I
enter on form fields. How can I do this by writing code
that can be triggered by some command buttons or may be
some macro action. I would appreciate if anyone can help
me to find the code on the form for navigation button
which update all the data entered on the form to the
related table records.
Hope I have explained my problem clearly well.
 
I not sure I understand your question, but if you need Form B to reflect the
data that you just changed on Form A, you'll need to requery the record
source of Form B.
In Form B's OnOpen and/or OnActivate event put:
Me!Requery
-Ed
 
Back
Top