need help with CloseButton=false 
Author Message
 need help with CloseButton=false

Hi,
I am now making a form in Access 97 in which it is importent that the user
will be able to write in data but this data will not be written into the
table - used rather for searching through what is in the table. My users
have been very spesific, they don't want to write data in one text box,
press search and than get the result in another textbox, but want to write
into the same box the result will appear in.
It seems the saving of the data goes on when one moves from one record to
another and when one closes the form. So I wrote som VBA kode so that
closing the form using my own "close" button, pressing the "search" button,
or going from post topost in the results set will not save any data.
My problem: If a user clickes on the built inn "close" button (the one in
the upper corner with a little X, as my users are used to doing, the data is
saved. I must avoid this.
I tried setting the form property "CloseButton" to no - but the button is
still there and is still active and fuctional. I tried setting "ControlBox"
to no, but the control box is still there , happy and active. I tried to
write a macro attached to the opening of the form that would set either or
both of these properties to false - I recieve a error message 2448 informing
me that the property cannot acept the value assigned.

Anyone know what is wrong? How can I correct this? Is there any other better
approah to preventing updates?

Thank you,
David,
frustrated in Norway



Fri, 19 Mar 2004 18:02:10 GMT  
 need help with CloseButton=false
Yes there is a better way, use a unbound textbox.


Quote:
> Hi,
> I am now making a form in Access 97 in which it is importent that the user
> will be able to write in data but this data will not be written into the
> table - used rather for searching through what is in the table. My users
> have been very spesific, they don't want to write data in one text box,
> press search and than get the result in another textbox, but want to write
> into the same box the result will appear in.
> It seems the saving of the data goes on when one moves from one record to
> another and when one closes the form. So I wrote som VBA kode so that
> closing the form using my own "close" button, pressing the "search"
button,
> or going from post topost in the results set will not save any data.
> My problem: If a user clickes on the built inn "close" button (the one in
> the upper corner with a little X, as my users are used to doing, the data
is
> saved. I must avoid this.
> I tried setting the form property "CloseButton" to no - but the button is
> still there and is still active and fuctional. I tried setting
"ControlBox"
> to no, but the control box is still there , happy and active. I tried to
> write a macro attached to the opening of the form that would set either or
> both of these properties to false - I recieve a error message 2448
informing
> me that the property cannot acept the value assigned.

> Anyone know what is wrong? How can I correct this? Is there any other
better
> approah to preventing updates?

> Thank you,
> David,
> frustrated in Norway



Sat, 20 Mar 2004 05:10:36 GMT  
 need help with CloseButton=false
You could use an unbound form, and do your lookups behind the scenes with
your own recordset, from which you would load the various controls with data
when a record is found.  This is probably the best solution if you never
want to update data, only find and display it.  Or you could use a bound
form with unbound controls, in which case you would move about in the form's
recordset but only move data from the fields to the controls when you want
to.

--
Dirk Goldgar
www.datagnostics.com

(to reply via e-mail, remove NOSPAM from address)


Quote:
> Hi,
> I am now making a form in Access 97 in which it is importent that the user
> will be able to write in data but this data will not be written into the
> table - used rather for searching through what is in the table. My users
> have been very spesific, they don't want to write data in one text box,
> press search and than get the result in another textbox, but want to write
> into the same box the result will appear in.
> It seems the saving of the data goes on when one moves from one record to
> another and when one closes the form. So I wrote som VBA kode so that
> closing the form using my own "close" button, pressing the "search"
button,
> or going from post topost in the results set will not save any data.
> My problem: If a user clickes on the built inn "close" button (the one in
> the upper corner with a little X, as my users are used to doing, the data
is
> saved. I must avoid this.
> I tried setting the form property "CloseButton" to no - but the button is
> still there and is still active and fuctional. I tried setting
"ControlBox"
> to no, but the control box is still there , happy and active. I tried to
> write a macro attached to the opening of the form that would set either or
> both of these properties to false - I recieve a error message 2448
informing
> me that the property cannot acept the value assigned.

> Anyone know what is wrong? How can I correct this? Is there any other
better
> approah to preventing updates?

> Thank you,
> David,
> frustrated in Norway



Sat, 20 Mar 2004 10:11:18 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. User and CloseButton - RE:

2. CloseButton

3. CloseButton and User

4. Hide or Disable the closebutton of a Userform

5. Disable closebutton

6. Disable the ControlBox (Window CloseButton)

7. ControlBox (Window CloseButton)

8. Min, Max, and CloseButton question

9. CRViewer CloseButton not enabled ?

10. Help,Can't set listview.visible = false

11. false stillexecuting, help?

12. Help - App.NonModalAllowed is FALSE!

 

 
Powered by phpBB® Forum Software