Re: same old "Data has been changed error message", way around this?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



DoCmd.Save won't work. That does not save the record: it only saves any
design changes to the form.

To save the record in the form, try:
If Me.Dirty Then Me.Dirty = False
This works even if the form does not have focus.

Do that explicitly before anything the requires an implicit save, such as
executing an Update query on the same data, opening a report, closing the
form, closing the database, finding or moving to another record, setting the
form's Filter or OrderBy or RecordSource, and so on.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Plink" <u22902@uwe> wrote in message news:619c1366d368c@xxxxxx
HI...

Can I impose for another problem? If I can get this licked, my first
database
is done and dusted!

Ill fill you in. Im searching for records, viewing results in a listbox,
and
populating reports from the listbox on one page. The user experience is
like
this:

-Open database, search fields are empty, listbox is populated with every
record.
-Wants to do a search of records, fills in search fields which populates
listbox with matching records.
-Wants to run a report of only SOME of the matching records, clicks on
relevant records individually, hits report buttons.
-Wants to do a new search, hits Refresh button.
ETC.

Ive probably constructed it wrong, but here is my solution: (All records
have
a PrintY_N field)

-Open database, all records are switched to Print= True
-On Searching, only matching records are Print=True
-On selecting SOME matching records , all records are switched to
Print=False,
and selected records only switched back to Print=True.
ETC.

I hope you get the general idea of my methods. It runs perfectly well,
quite
happy with the solution, but of course what happens is if I mess about
with
the search sequences etc, I get the message we're all familiar with "Data
has
been changed by another user" . it doesn't throw any problems except it
forces the user to reselect some records. Ideally I would just switch this
message off completely, is this possible? Ive been trying to add a
docmd.save
in before updates and after updates and stuff, but nothing doing.

..........help?
You


.



Relevant Pages

  • same old "Data has been changed error message", way around this?
    ... If I can get this licked, my first database ... populating reports from the listbox on one page. ... -Wants to run a report of only SOME of the matching records, ... Ideally I would just switch this ...
    (microsoft.public.access.formscoding)
  • New Shareware: MyIdeasJournal version 1.1
    ... MyIdeasJournal is a database program that you can use to capture ... Searching for entries by subject is also very easy and fast. ... listbox item. ... you are either in Search mode or in Browse mode. ...
    (comp.software.shareware.announce)
  • Re: Change Text to Memo
    ... Sorry I didn't initially mention that the database is elsewhere. ... Switch a given table field to Memo ... Function SwitchFieldType(sDb As String, sTableName As String, sFieldName ... Dim sSQL As String ...
    (microsoft.public.access.modulesdaovba)
  • Re: Help - Cant understand Code
    ... Listbox with MultiSelection used in Query ... I have the sample database in its orignial form. ... The subform doesn't have a SELECT statement however the query it is bound ...
    (microsoft.public.access.forms)
  • Re: Inserting data from MS Access to MS Word
    ... UserForm Initialize event with the data from a table in your database. ... 'Set the number of columns in the listbox ... Private Sub CommandButton1_Click ...
    (microsoft.public.word.docmanagement)