A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

records being overwritten/changed when switching to design view and then back



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2004, 08:36 PM
munscher
external usenet poster
 
Posts: n/a
Default records being overwritten/changed when switching to design view and then back

I have a FORM which contains a COMBO BOX with a list of numbers (100, 200, and 300)

It defaults to the first number (100)... if you select say 200, and then decide you need to change something in the form so you switch to FORM DESIGN .. then switch back to FORM VIEW... the record in the TABLE that was referenced by the combo box that had the value 100 now has the value 200. Is there a way to prevent this? I hope that was clear.
  #2  
Old May 27th, 2004, 10:28 PM
Dirk Goldgar
external usenet poster
 
Posts: n/a
Default records being overwritten/changed when switching to design view and then back

"munscher" wrote in message

I have a FORM which contains a COMBO BOX with a list of numbers (100,
200, and 300)

It defaults to the first number (100)... if you select say 200, and
then decide you need to change something in the form so you switch to
FORM DESIGN .. then switch back to FORM VIEW... the record in the
TABLE that was referenced by the combo box that had the value 100 now
has the value 200. Is there a way to prevent this? I hope that was
clear.


Changing from Form View to Design View is tantamount to closing the
form, and Access will always try to save the current record when you
close the form, if it's "dirty" (i.e., modified and unsaved). What
would you want Access to do instead? Access doesn't know if you're ever
going to switch back to Form View, and it assumes that you've changed
data and want those changes saved.

You could press the Escape key to undo your changes before you switch to
Design View.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


  #3  
Old May 28th, 2004, 03:16 AM
munscher
external usenet poster
 
Posts: n/a
Default records being overwritten/changed when switching to design view and then back

thanks for the info, at least i understand it better.

so is there no way at all to safeguard this? lock the entries from edit in the table maybe?
  #4  
Old May 28th, 2004, 03:41 AM
Dirk Goldgar
external usenet poster
 
Posts: n/a
Default records being overwritten/changed when switching to design view and then back

"munscher" wrote in message

thanks for the info, at least i understand it better.

so is there no way at all to safeguard this? lock the entries from
edit in the table maybe?


If the form is opened to allow edits, and the combo box is bound to a
field in the table, then the user's changes to the combo box are going
to be reflected in the table unless the update is canceled in some
fashion.

You can (a) set the form's AllowEdits property to No/False
permanently -- in which case there's not really much point in using a
combo box to display the field from the table -- or (b) set the combo
box's Locked property to Yes/True, or (c) do either of the above, but
have a button on the form that "unlocks" the form or the control to
allow edits, or (d) do something else depending on how you want the form
to be used (which I don't know).

What you do really depends on how you intend the form to be used. What
is this combo box for if you don't want the user to be able to change
its value?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.