Re: 2003: record writes through form

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

From: Dirk Goldgar (dg_at_NOdataSPAMgnostics.com)
Date: 07/11/04


Date: Sun, 11 Jul 2004 12:27:58 -0400


"Jim Shores" <jimyoubetternotcryS@bellsouth.wet> wrote in message
news:0CDC0CFE-D03C-4C0A-B418-8725E4B52F12@microsoft.com
> Hi,
> It's been bugging me, OK, a frmTransX, has a mere 354 records to
> its credit. The table is tblTransX, the pkey and a date and memo
> fields. TransXDetail is many-to-many also with tblAccts. It has a
> DoCmd.Save button even, but still, I'll be filling out a new
> record, to go to tblTransX, with tblTransXDetails . . . And later or
> right away I notice the thing has forgotten what I put in the edit
> controls. If this makes no sense, please pardon me. I do not
> automatically get a new AutoNumberwhen I mash asterisk. Reader, do
> you know how one might instruct the form to finalize a new record
> before I fill-out the form, so I don't have to worry about whether it
> picked up the stuff entered in the form?

Your question is a little unclear, but one thing you may not be aware of
is that the statement DoCmd.Save does *not* save the form's current
record. It saves the *design* of the form, not its data. If you need
to use code to save the current record before Access would normally do
so, use

    RunCommand acCmdSaveRecord

or

    Me.Dirty = False

(I like "Me.Dirty = False", but if the record can't be saved for some
reason, the error message you get is a little misleading -- it talks
about being unable to set a property, rather than being unable to save
the record.)

Normally, Access will save the form's current record automatically (if
it has been modified) whenever you move to a different record, or close
the form, or switch the focus from the main form to a subform. So I'm
not sure why you would be having records that aren't saved eventually,
if not when you click your save button.

-- 
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)


Relevant Pages

  • Re: Depression Financial
    ... three months on the end of the loan without any fees or credit dings. ... Everyone knows what stress does to someone and it's very hard to just ... While I agree in concept, if I forget about what's bugging me, it ... submission) as opposed to letting them grow to big that they beat me ...
    (alt.support.chronic-pain)
  • Re: Depression Financial
    ... appreciate the heads up & will usually extend you a little breathing ... three months on the end of the loan without any fees or credit dings. ... While I agree in concept, if I forget about what's bugging me, it ... submission) as opposed to letting them grow to big that they beat me ...
    (alt.support.chronic-pain)
  • Re: SF Movies for non-SF fans
    ... > S.F. and a chick flick all at the same time. ... This has been bugging me, so I have to point out that it's interesting to see ... some of the men - I want to give credit where credit is due!) ... Just mentioning it. ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: Summarize array with respect to values in another...
    ... intrinsic SUM, reduced processing time to mere minutes. ... Glen gets most of the credit on this one) could help. ...
    (comp.lang.fortran)
  • Re: Why vehicles suck
    ... you had to be a mere 100 yards away to get credit for the kill. ...
    (alt.games.warcraft)