Changes in a continuous form

D

Dave

One of my subforms is a continuous form. Several lines of records will
be added or edited each time. I currently have a message box that
comes up to confirm a change, but when you edit or add each line of
the continuous form, this message box comes up everytime. It's kind of
annoying.

Is there a way to confirm changes to several lines (records) on the
continuous form at the end of the data entry? Such as a save button?

Thanks,

Dave
 
D

Dirk Goldgar

Dave said:
One of my subforms is a continuous form. Several lines of records will
be added or edited each time. I currently have a message box that
comes up to confirm a change, but when you edit or add each line of
the continuous form, this message box comes up everytime. It's kind of
annoying.

Is there a way to confirm changes to several lines (records) on the
continuous form at the end of the data entry? Such as a save button?


There's no easy way. Access has to save each edited record *somewhere*
before it can edit the next one. You could bind the subform to a temporary
or work table, and use a Save button to copy all the records from that
temporary table back to the "live" table.
 
D

Dave

There's no easy way.  Access has to save each edited record *somewhere*
before it can edit the next one.  You could bind the subform to a temporary
or work table, and use a Save button to copy all the records from that
temporary table back to the "live" table.


Thanks Dirk,

That's kind of what I thought. But then my bound subform would'nt of
course, show the existing data. Perhaps just a "view" subform with a
button to add a record which opens another form for data entry which
is bound to the temporary table.
The save button then would automatically fire an append query?

Dave
 
A

Arvin Meyer [MVP]

No, a continuous form automatically saves the record as soon as you move off
of it. You can accomplish what you want by using unbound forms, that is,
forms which are not connected to the data. You will then need to fill the
form in code to read the records, and also use code to write the data back.
Lots of work, little advantage. If the message box is annoying, I suggest
deleting it.
 
D

Dirk Goldgar

Dave said:
On Aug 27, 12:36 pm, "Dirk Goldgar"

That's kind of what I thought. But then my bound subform would'nt of
course, show the existing data.

Not necessarily. In the main form's Current event, you would load the temp
table up with the relevant records from the "live" subtable, so that those
records would be available for viewing and editing. Then your Save button
would delete the original records from the subtable and copy the records
from the temp table back into it. Or else it would use more complex logic
to update the existing records, delete existing records that were deleted
from the temp table, and add new records from the temp table to the live
table.
Perhaps just a "view" subform with a btton to add a record which opens
another form for data entry which i bound to the temporary table. The save
button then would automatically fire an append query?

That would be a viable alternative. It all depends on how you see your
users working with the data. I generally stick with the standard Access
model, which has every record being updated as the user leaves the record,
with no special prompt. But in circumstances where that is really
undesirable, you can take another approach so long as you are willing to
code for it.
 
D

Dave

Not necessarily.  In the main form's Current event, you would load the temp
table up with the relevant records from the "live" subtable, so that those
records would be available for viewing and editing.  Then your Save button
would delete the original records from the subtable and copy the records
from the temp table back into it.  Or else it would use more complex logic
to update the existing records, delete existing records that were deleted
from the temp table, and add new records from the temp table to the live
table.


That would be a viable alternative.  It all depends on how you see your
users working with the data.  I generally stick with the standard Access
model, which has every record being updated as the user leaves the record,
with no special prompt.  But in circumstances where that is really
undesirable, you can take another approach so long as you are willing to
code for it.

If there's no easy fix I guess I'll just have to put some faith in
those doing the data entry and hope for the best.

Thanks,

Dave
 
A

Al Campagna

Dave,
I agree with Dirk and Arvin...

After I originally read your post, I did a bit of "cogitating", and I'm
really
questioning the whole concept of a "Saved" message.

Coding for that could (as you've seen) get a bit messy and time
consuming,
and... just telling the user that they just "updated X amount of records"
really
doesn't buy the user anything.
Better to spend time coding the form to help the users avoid mistakes,
than
just an after the fact "saved" message.
More bang for the buck...
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top