The only thing that occurs to me is to double check that you didn't
misspell the name of the form and/or text box.
You're apparently using a French version of Access (or Windows, or
both). It's possible you need to put
[Formulaires]![FNoPeriodePaye]![NoPeriodePaye] rather than
[Forms]![FNoPeriodePaye]![NoPeriodePaye], but that would surprise me...
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Hi everybody,
Hi Douglas,
Thank you for your answer.
It was not open. I opened it and it made no diffenrence.
Any other suggestion ???
Thanks again,
Céline
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> a écrit dans le
message de news: (e-mail address removed)...
Is your form open when you run the query? Access will not open the
form just because you're referencing it.
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Hi everybody,
Hi Arvin,
Thank you so much for your answer.
I created a table SousTableNoPeriodePaye with a text field
NoPeriodePaye. With that table I create a form FNoPeriodePaye with
the text fied of the table.
I added the WHERE line to my SQL codes.
When I execute the query a dialog box is asking to type in the
parameter of Formulaires!FNoPeriodePaye!NoPeriodePaye.
What has to be corrected ???
Below are my codes.
Many thanks again,
Céline
-------------------------------------------
INSERT INTO Historique ( NoEmploye, NoPeriode, [Date], Semaine,
NoDep, NoClass, Heures, Taux, NoCode, Anciennete, [Note] )
SELECT [FeuilleDeTemps].[NoEmploye], [FeuilleDeTemps].[NoPeriode],
[FeuilleDeTemps].[DateDebut], "Sem 1" AS Semaine,
[FeuilleDeTemps].[NoDepartement],
[FeuilleDeTemps].[NoClassification], [FeuilleDeTemps].[DIM1],
IIf([Taux 2]=True,[Taux2],IIf([RetourTaux2]=True,[Taux2],[Taux1])) AS
Taux, [FeuilleDeTemps].[NoCodeDim1], IIf([NoStatut]=1 And [SiDim1]=-1
And [NoCodeDim1]=19,2,IIf([SiDim1]=-1,1,0)) AS Anciennete,
[FeuilleDeTemps].[NoteDim1]
FROM (Employes INNER JOIN FeuilleDeTemps ON
[Employes].[NoEmploye]=[FeuilleDeTemps].[NoEmploye]) INNER JOIN
SousTableDepartement ON
[FeuilleDeTemps].[NoDepartement]=[SousTableDepartement].[NoAutoDep]
WHERE NoPeriode=[Forms]![FNoPeriodePaye]![NoPeriodePaye];
"Arvin Meyer [MVP]" <
[email protected]> a écrit dans le message de (e-mail address removed)...
Add a form with an unbound textbox on it. Fill in the data and use
the
form's textbox as a criteria in each of the 14 queries:
Select * From Whatever
Where PayrollDate = Forms!FormName!txtBoxName
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
Hi everybody,
14 queries execute one after the other via a macro.
A common field : Payroll date.
I would like to add the possibility to specify which payroll date.
But of course, I don't want to be ask 14 times which payroll date.
How do I add a common variable for many queries ????
Thank you for your help and have a good day,
Céline