Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

procmail + change subject, w2ksp4.exe download, /proc/kallsyms format, sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header

Links

XODOX
Impressum

#1: Send to rpt before moving to a new record

Posted on 2005-04-13 15:29:40 by ugo_lavoie

Hi, i have a little problem: I have a form where people enter data and
when they click on the save button it saves the data then open 2 field
for my criterias and then open a rpt with that. But when i enter the
criterias all the data that i jut put in the tform r gonne to my table
and r no more visible.

exemple : I fill the form, i click save, the form moves to a new record
(blank), 2 message box open for my criterias,one i fill those 2 boxes
with the ID and Date that i've just put in the form then the report
prints (i dont want to see the rpt, just print it). But what i want to
do is: Fill the form, click save button and automatically send the data
i just put in the form to my rpt and print it (dont want to see the rpt
open but just print it with my data), then go back to a blank (new)
form.

As far as i know, i have to save it before being able to put it in the
rpt to print it.

I've just start using the DoCmd and its wonerfull but i'm not sure if i
can call the print job before the acNewRec(i thnik that this is where
it moves to a new blank form)? I dont mind entering my criterias (Date
and ID) but if it can be done automatically it would help me a lot.

My code:

Private Sub addbutton_Click()
On Error GoTo Err_addbutton_Click


DoCmd.GoToRecord , , acNewRec

Call Print_Click (i use to have a print button...so i didnt change it,
the print button is invisible)

Exit_addbutton_Click:
Exit Sub

Err_addbutton_Click:
MsgBox "Error....bla...bla...bla"
Resume Exit_addbutton_Click

End Sub




Right now i can use it and it doesnt bother me too much, but i dont
think user will find it easy.

any help would be appreciated

Report this message

#2: Re: Send to rpt before moving to a new record

Posted on 2005-04-13 19:17:31 by Arno R

You need to save your record BEFORE you go to a new record and
use the values from your specific form's controls as the criteria for =
your report.
AFTER that you can move to a new empty record like:

1 DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
2 Call Print_Click=20
3 DoCmd.GoToRecord , , acNewRec

--=20
Hope this helps
Arno R


"NomoreSpam4Me@hotmail.com" <ugo_lavoie@hotmail.com> schreef in bericht =
news:1113398979.964482.74240@o13g2000cwo.googlegroups.com...
> Hi, i have a little problem: I have a form where people enter data and
> when they click on the save button it saves the data then open 2 field
> for my criterias and then open a rpt with that. But when i enter the
> criterias all the data that i jut put in the tform r gonne to my table
> and r no more visible.
>=20
> exemple : I fill the form, i click save, the form moves to a new =
record
> (blank), 2 message box open for my criterias,one i fill those 2 boxes
> with the ID and Date that i've just put in the form then the report
> prints (i dont want to see the rpt, just print it). But what i want to
> do is: Fill the form, click save button and automatically send the =
data
> i just put in the form to my rpt and print it (dont want to see the =
rpt
> open but just print it with my data), then go back to a blank (new)
> form.
>=20
> As far as i know, i have to save it before being able to put it in the
> rpt to print it.
>=20
> I've just start using the DoCmd and its wonerfull but i'm not sure if =
i
> can call the print job before the acNewRec(i thnik that this is where
> it moves to a new blank form)? I dont mind entering my criterias (Date
> and ID) but if it can be done automatically it would help me a lot.
>=20
> My code:
>=20
> Private Sub addbutton_Click()
> On Error GoTo Err_addbutton_Click
>=20
>=20
> DoCmd.GoToRecord , , acNewRec
>=20
> Call Print_Click (i use to have a print button...so i didnt change it,
> the print button is invisible)
>=20
> Exit_addbutton_Click:
> Exit Sub
>=20
> Err_addbutton_Click:
> MsgBox "Error....bla...bla...bla"
> Resume Exit_addbutton_Click
>=20
> End Sub
>=20
>=20
>=20
>=20
> Right now i can use it and it doesnt bother me too much, but i dont
> think user will find it easy.
>=20
> any help would be appreciated
>

Report this message

#3: Re: Send to rpt before moving to a new record

Posted on 2005-04-13 19:37:06 by ugo_lavoie

thk u so much,


works like a charm now.
i'll remember this line.

Report this message