Connecting Tech Pros Worldwide Forums | Help | Site Map

To save from a temporary table??

Larry
Guest
 
Posts: n/a
#1: Nov 12 '05
Hi,

I have unbelievable problems just to save a record!

I make an input to a record in a subform, which has a
temporary table as its recordsource.

When I am done, and want to save the record, I want to bring
the data from the temporary table over to the regular table.
But the data isn't in the temporary table yet, it is still
on the form.

So I do the obvious 'DoCmd.Save'. That has no effect.
The temporary table is empty.
I do 'Parent.SetFocus' to leave the subform and possibly
force a saving. This has no effect.
The temporary table is empty.
I try to use the Recordsetclone of the subform to get the
data from it, but this is for some reason empty.
I do 'Docmd.Close acForm, Me.Name', referring to the
subform. Plus 'DoEvents'. But the subform does not close at
this moment.
And still the data does not appear in the temporary table
which is/was the recordsource for the subform.

Not until I have completely left the Saving procedure does
the subform close and the data appears in the temporary
table.
But the first idea with the Saving procedure was just to
bring the data over from the temporary table.

Of course I can now open a new procedure and catch the data
from the now filled temporary table...

But it cannot be this stupid, I must have missed something.
Can you give me some hints?

Larry

Tony Toews
Guest
 
Posts: n/a
#2: Nov 12 '05

re: To save from a temporary table??


Larry <lm1798@telia.com> wrote:

Please ignore the posting from starwars. He's being rather disruptive.
[color=blue]
>When I am done, and want to save the record, I want to bring
>the data from the temporary table over to the regular table.
>But the data isn't in the temporary table yet, it is still
>on the form.
>
>So I do the obvious 'DoCmd.Save'.[/color]

That saves the form. Not the record. You really wanted:
docmd.RunCommand acCmdSaveRecord

However it's been my experience in A2000 that if the record does not need saving this
causes an error. Thus you're better off using the following:

if me.dirty = true then me.dirty = false

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
J.B. Butler
Guest
 
Posts: n/a
#3: Nov 12 '05

re: To save from a temporary table??



"starwars" <nobody@tatooine.homelinux.net> wrote in message
news:84d2f5615bf8aace758aba494bbefbfb@tatooine.hom elinux.net...[color=blue]
> Larry wrote:
>[color=green]
> > Hi,
> >
> > I have unbelievable problems just to save a record!
> >
> > I make an input to a record in a subform, which has a
> > temporary table as its recordsource.
> >
> > When I am done, and want to save the record, I want to bring
> > the data from the temporary table over to the regular table.
> > But the data isn't in the temporary table yet, it is still
> > on the form.
> >
> > So I do the obvious 'DoCmd.Save'. That has no effect.
> > The temporary table is empty.
> > I do 'Parent.SetFocus' to leave the subform and possibly
> > force a saving. This has no effect.
> > The temporary table is empty.
> > I try to use the Recordsetclone of the subform to get the
> > data from it, but this is for some reason empty.
> > I do 'Docmd.Close acForm, Me.Name', referring to the
> > subform. Plus 'DoEvents'. But the subform does not close at
> > this moment.
> > And still the data does not appear in the temporary table
> > which is/was the recordsource for the subform.
> >
> > Not until I have completely left the Saving procedure does
> > the subform close and the data appears in the temporary
> > table.
> > But the first idea with the Saving procedure was just to
> > bring the data over from the temporary table.
> >
> > Of course I can now open a new procedure and catch the data
> > from the now filled temporary table...
> >
> > But it cannot be this stupid, I must have missed something.
> > Can you give me some hints?
> >
> > Larry[/color]
>
>
> Are you also "Larry Linson"?
>
>[/color]


That sounds like the "Larry Linson" everybody around here knows.



Larry
Guest
 
Posts: n/a
#4: Nov 12 '05

re: To save from a temporary table??


Thanks,Tony!!
/Larry (not Linson)
Tony Toews
Guest
 
Posts: n/a
#5: Nov 12 '05

re: To save from a temporary table??


Steve Jorgensen <nospam@nospam.nospam> did not write that posting.
[color=blue]
>Comments: This message did not originate from the Sender address above.
> It was remailed automatically by anonymizing remailer software.[/color]

This is a forgery.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Bas Cost Budde
Guest
 
Posts: n/a
#6: Nov 12 '05

re: To save from a temporary table??


Steve Jorgensen didn't write:

Comments: This message did not originate from the Sender address above.
X-No-Archive: Yes

--
Bas Cost Budde
http://www.heuveltop.nl/BasCB

phobos
Guest
 
Posts: n/a
#7: Nov 12 '05

re: To save from a temporary table??


Bas Cost Budde <bas@heuveltop.org> wrote in message news:<bvrqov$2vn$1@news2.solcon.nl>...[color=blue]
> Steve Jorgensen didn't write:
>
> Comments: This message did not originate from the Sender address above.
> X-No-Archive: Yes[/color]

Sometimes it's nice to be reading USENET via Google. People who post
with X-No-Archive rarely have anything to say that's worth reading :-)
Tony Toews
Guest
 
Posts: n/a
#8: Nov 12 '05

re: To save from a temporary table??


phobos2@hotmail.com (phobos) wrote:
[color=blue]
>Sometimes it's nice to be reading USENET via Google. People who post
>with X-No-Archive rarely have anything to say that's worth reading :-)[/color]

<chuckle> Good one.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Closed Thread