Issues with using .AddNew directly on a Form's Recordset

D

dch3

I'm now curious if there are any issues with using the .AddNew method of a
Form's record set as in...

[Forms]![frmTrailerActivityUnloadsWizard]![subfrmTrailerActivityUnloadsDetail].Form.Recordset.AddNew

Specifically, what should I be on the lookout for?

I'm using the statement as an alternative to DoCmd.GotoRecord as I'm
building a Wizard where the subform is on one page and the event that
triggers it will occur on another.
 
D

dch3

And let me guess, the fact that your post double posted was a well crafted
joke given the subject?

Anyways...did you see the other post about .AddNew causing the Autonumber to
skip? I'm curious if I was on target with understanding the reason why.

Dirk Goldgar said:
(re-posting, as my original message doesn't appear)

dch3 said:
I'm now curious if there are any issues with using the .AddNew method of a
Form's record set as in...

[Forms]![frmTrailerActivityUnloadsWizard]![subfrmTrailerActivityUnloadsDetail].Form.Recordset.AddNew

Specifically, what should I be on the lookout for?

I'm using the statement as an alternative to DoCmd.GotoRecord as I'm
building a Wizard where the subform is on one page and the event that
triggers it will occur on another.


I have used it with no ill effects. I'm always cautious of using the form's
recordset directly, but I have used "Me.Recordset.FindFirst ..." frequently,
and "Me.Recordset.AddNew" occasionally and had no problems. I believe I
have also used Me.Recordset.Delete, but I can't swear to that.

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

(please reply to the newsgroup)
 
D

Dirk Goldgar

dch3 said:
And let me guess, the fact that your post double posted was a well crafted
joke given the subject?

I wish I could claim that.

And using Windows Mail for my newsreader, I'm still not seeing either of
them. I've logged out of the "community features" for this post, so that
I'll know if it posts. This is a known bug that MS are working on.
Anyways...did you see the other post about .AddNew causing the Autonumber
to
skip? I'm curious if I was on target with understanding the reason why.

I did see that post, and I can reproduce the behavior with a simple form,
though I never noticed it before. I don't know whether your conjecture
about the cause is exactly correct, but I think it must be something like
that. It makes sense to me, anyway, though I'm inclined to call it a bug,
if a minor one. It won't cause any problem unless you care what value is
assigned as an autonumber, which we're not supposed to do. Still, it's an
unexpected behavior that makes a person wonder what's going on, and that's
not really a good thing.
 
D

Dirk Goldgar

dch3 said:
Actually there is a fix for the problems you've been having its available
<a
link="http://www.spreadfirefox.com/">here.</a>

If I remember my HTML correctly.


Not exactly -- it would be "href=". But the browser has nothing to do with
the problem. This is a glitch in the "community features" of Windows Mail,
the mail and news client that is the Vista counterpart of Outlook Express,
or in the handling of these features in the interface between Microsoft's
web forums and NNTP.. The web browser is irrelevant.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top