Re: Lost Record after data entry
From: Steve Schapel (schapel_at_mvps.org.ns)
Date: 07/23/04
- Next message: Steve Mulhall: "Re: Running SQL Command From Form"
- Previous message: Allen Browne: "Re: Lost Record after data entry"
- In reply to: Mark S: "Lost Record after data entry"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 23 Jul 2004 20:36:55 +1200
Mark,
It is more likely, I think, that the new record is being discarded
because, for example, a required field is left blank, or a validation
rule is violated. In any case, there is a better way to achieve your
purpose...
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport strDocName, acViewNormal, , strWhere
-- Steve Schapel, Microsoft Access MVP Mark S wrote: > On a data entry form I have a Print but that basically performs the > following: > DoCmd.Close > DoCmd.OpenReport strDocName, acViewNormal, , strWhere > DoCmd.OpenForm "frmMTAG", acNormal, , strWhere > strWhere is from a unique autonumber field on the form. > I thought I was using the Close to make sure the record was stored, > then printed it, then reopened it. This works fine most of the time. > Occassianally, the record is completely lost. You can see that the > autonum field has incremented when you create the next record, but the > lost record is nowhere in the table. > > I am guessing the OpenReport is occuring before the Close completely > stores the record. > > Any suggestions?
- Next message: Steve Mulhall: "Re: Running SQL Command From Form"
- Previous message: Allen Browne: "Re: Lost Record after data entry"
- In reply to: Mark S: "Lost Record after data entry"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|