dbTalk Databases Forums  

Save or Drop Record?

comp.databases.ms-access comp.databases.ms-access


Discuss Save or Drop Record? in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
N J
 
Posts: n/a

Default Save or Drop Record? - 07-04-2005 , 04:00 PM






Hi,

I have 2 forms open at the same time, Form 1 adds information to a field on
a record that Form 2 has open. It used to show the new information on Form 2
straight away in a text box but now it doesn't, and when I go to close Form
2 after making changes to other fields, it asks if I want to Drop or Save
changes made by another user.

Any idea's?

Thanks..



Reply With Quote
  #2  
Old   
Rick Brandt
 
Posts: n/a

Default Re: Save or Drop Record? - 07-04-2005 , 04:18 PM






N J wrote:
Quote:
Hi,

I have 2 forms open at the same time, Form 1 adds information to a
field on a record that Form 2 has open. It used to show the new
information on Form 2 straight away in a text box but now it doesn't,
and when I go to close Form 2 after making changes to other fields,
it asks if I want to Drop or Save changes made by another user.

Any idea's?

Thanks..
You cannot edit a record from two forms like that unless you make sure you
commit all changes in the first form before opening the second form and then
commit the changes from the second form before returning to the first one. Two
forms editing a record at once is no different (to Access/Jet) that two users
doing so.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com




Reply With Quote
  #3  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: Save or Drop Record? - 07-04-2005 , 04:31 PM



When does form 1 add this info? At what point, or how does this happen?

If form1 is being called from from2, then you need form 2 to issue a disk
write before form 1 is launched.

you can go in the code

if me.Dirty = true then
me.dirty = false ' force a disk write
end if
docmd.openform "form1"

So, you just have to coordinate this a bit better. If another user, another
form, or even some code, or even a query modifies the data in the form that
you are working on, then you are going to get a message that someone,
something etc. changed the data.

So, just make sure you write out the data before that other stuff runs.


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal (AT) msn (DOT) com
http://www.members.shaw.ca/AlbertKallal



Reply With Quote
  #4  
Old   
Pachydermitis
 
Posts: n/a

Default Re: Save or Drop Record? - 07-04-2005 , 07:50 PM



It sounds like you have a record on form2 that has not been saved. Do
you write code?
On your before update event for form1
form2.undo 'undo any changes that will upset form 2
On the after update event for form1
form2.refresh
Hope that gives you enough to figure it out
Pachydermitis


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.