Form to query

L

Lisa

Hello everybody, I have a question concerning the "Enter Parameter Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of possibilities is
shown?

Another question has to do with the same query. This asks a date from and to
(in the query criteria >[from] And [to]. I would like the selected period to
be shown in the report. Is this possible (and if so... how can I achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it is
really necessary
 
J

Jeanette Cunningham

Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" & Me.TheEndDateControl &
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Lisa said:
Hello everybody, I have a question concerning the "Enter Parameter Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of possibilities
is shown?

Another question has to do with the same query. This asks a date from and
to
(in the query criteria >[from] And [to]. I would like the selected period
to
be shown in the report. Is this possible (and if so... how can I achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it is
really necessary
 
L

Lisa

Hello Jeanette, my form has 2 text boxes (1 for the start date, 1 for the
end date) and 1 combobox (which works properly). I refered my query to those
boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql of my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID =
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

Jeanette Cunningham said:
Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" & Me.TheEndDateControl &
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Lisa said:
Hello everybody, I have a question concerning the "Enter Parameter Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of possibilities
is shown?

Another question has to do with the same query. This asks a date from and
to
(in the query criteria >[from] And [to]. I would like the selected period
to
be shown in the report. Is this possible (and if so... how can I achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it is
really necessary
 
J

Jeanette Cunningham

Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no typos
The end date control on the form is called DataA - make sure no typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from here)
=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Lisa said:
Hello Jeanette, my form has 2 text boxes (1 for the start date, 1 for the
end date) and 1 combobox (which works properly). I refered my query to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql of my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID =
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

Jeanette Cunningham said:
Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" & Me.TheEndDateControl &
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Lisa said:
Hello everybody, I have a question concerning the "Enter Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date from
and to
(in the query criteria >[from] And [to]. I would like the selected
period to
be shown in the report. Is this possible (and if so... how can I achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it is
really necessary
 
L

Lisa

Hello Jeanette. I've gone thru all the checks, many times, I have asked
other people to check for typos. I am sure that all the fields are named
correctly, and also the formats are correct. Still I get the same error
message.
Jeanette Cunningham said:
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no typos
The end date control on the form is called DataA - make sure no typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from here)
=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Lisa said:
Hello Jeanette, my form has 2 text boxes (1 for the start date, 1 for the
end date) and 1 combobox (which works properly). I refered my query to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql of my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

Jeanette Cunningham said:
Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" & Me.TheEndDateControl &
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date from
and to
(in the query criteria >[from] And [to]. I would like the selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it is
really necessary
 
J

Jeanette Cunningham

Lisa,
there is something more wrong than just the text boxes and combo box.

Use this query without any where clause and let me know what happens.

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID =
Transazioni.CausaleID

Jeanette Cunningham


Lisa said:
Hello Jeanette. I've gone thru all the checks, many times, I have asked
other people to check for typos. I am sure that all the fields are named
correctly, and also the formats are correct. Still I get the same error
message.
Jeanette Cunningham said:
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no typos
The end date control on the form is called DataA - make sure no typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from here)
=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Lisa said:
Hello Jeanette, my form has 2 text boxes (1 for the start date, 1 for
the
end date) and 1 combobox (which works properly). I refered my query to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" & Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date from
and to
(in the query criteria >[from] And [to]. I would like the selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it
is
really necessary
 
A

aiman via AccessMonster.com

u can try this

go to microsoft online, search for using parameter value in queries
they give step by step how to create it using forms..
just cut n paste the code but don't forget to change the field name..
 
J

Jeanette Cunningham

Lisa,
I am not sure why you had the dates with a format expression like
"\#yyyy\-mm\-dd\#"

It seems to work better without any format for the dates as shown below.
=[Forms]![Reference]![DataDa]
And
Anagrafica.SysDate<=[Forms]![Reference]![DataA]

Was there a particular problem with the query and "\#yyyy\-mm\-dd\#" was
added to try to fix it?


Jeanette Cunningham

Lisa said:
Hello Jeanette. I've gone thru all the checks, many times, I have asked
other people to check for typos. I am sure that all the fields are named
correctly, and also the formats are correct. Still I get the same error
message.
Jeanette Cunningham said:
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no typos
The end date control on the form is called DataA - make sure no typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from here)
=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Lisa said:
Hello Jeanette, my form has 2 text boxes (1 for the start date, 1 for
the
end date) and 1 combobox (which works properly). I refered my query to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" & Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date from
and to
(in the query criteria >[from] And [to]. I would like the selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it
is
really necessary
 
L

Lisa

Jeanette, this way of formatting the date was given to me because,
apparently, queries will only accept a certain date format. I will try what
you just told me and let you know what the result is

thanks again
Jeanette Cunningham said:
Lisa,
I am not sure why you had the dates with a format expression like
"\#yyyy\-mm\-dd\#"

It seems to work better without any format for the dates as shown below.
=[Forms]![Reference]![DataDa]
And
Anagrafica.SysDate<=[Forms]![Reference]![DataA]

Was there a particular problem with the query and "\#yyyy\-mm\-dd\#" was
added to try to fix it?


Jeanette Cunningham

Lisa said:
Hello Jeanette. I've gone thru all the checks, many times, I have asked
other people to check for typos. I am sure that all the fields are named
correctly, and also the formats are correct. Still I get the same error
message.
Jeanette Cunningham said:
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no typos
The end date control on the form is called DataA - make sure no typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from here)

=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Hello Jeanette, my form has 2 text boxes (1 for the start date, 1 for
the
end date) and 1 combobox (which works properly). I refered my query to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON
Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" & Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date from
and to
(in the query criteria >[from] And [to]. I would like the selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it
is
really necessary
 
L

Lisa

Jeanette, I have used the query as you told me to. If I run it I get a
report with Importo, Note, Nome, Cognome, Causale, Datas, Indirizzo,
Cap&Citta, Provincia, SysDate, Email. All fields have values.

I have also tried this in the query we were working on:
=[Forms]![Reference]![DataDa]
And
Anagrafica.SysDate<=[Forms]![Reference]![DataA]

but all I get is an empty form, just with headers... which is more than
before... where all we got was an error message

Jeanette Cunningham said:
Lisa,
there is something more wrong than just the text boxes and combo box.

Use this query without any where clause and let me know what happens.

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID =
Transazioni.CausaleID

Jeanette Cunningham


Lisa said:
Hello Jeanette. I've gone thru all the checks, many times, I have asked
other people to check for typos. I am sure that all the fields are named
correctly, and also the formats are correct. Still I get the same error
message.
Jeanette Cunningham said:
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no typos
The end date control on the form is called DataA - make sure no typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from here)

=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Hello Jeanette, my form has 2 text boxes (1 for the start date, 1 for
the
end date) and 1 combobox (which works properly). I refered my query to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON
Causali.CausaleID =
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" & Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date from
and to
(in the query criteria >[from] And [to]. I would like the selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it
is
really necessary
 
L

Lisa

Jeanette, I have tried this: in the criteria for the dates I left the
reference to the form and I have disactivated the combobox for Causali
(Motivation in Italian) - I've set the criteria to [Motivo] and IT WORKS! I
get the right dates and the right Causali... so I guess the error is in the
combobox. If I run the query any other way I get a blank form.... does this
help?


Lisa said:
Jeanette, this way of formatting the date was given to me because,
apparently, queries will only accept a certain date format. I will try
what you just told me and let you know what the result is

thanks again
Jeanette Cunningham said:
Lisa,
I am not sure why you had the dates with a format expression like
"\#yyyy\-mm\-dd\#"

It seems to work better without any format for the dates as shown below.
=[Forms]![Reference]![DataDa]
And
Anagrafica.SysDate<=[Forms]![Reference]![DataA]

Was there a particular problem with the query and "\#yyyy\-mm\-dd\#" was
added to try to fix it?


Jeanette Cunningham

Lisa said:
Hello Jeanette. I've gone thru all the checks, many times, I have asked
other people to check for typos. I am sure that all the fields are named
correctly, and also the formats are correct. Still I get the same error
message.
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no
typos
The end date control on the form is called DataA - make sure no typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from here)

=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Hello Jeanette, my form has 2 text boxes (1 for the start date, 1 for
the
end date) and 1 combobox (which works properly). I refered my query to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON
Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" &
Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date
from
and to
(in the query criteria >[from] And [to]. I would like the selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether it
is
really necessary
 
J

Jeanette Cunningham

Lisa,
that combo - how many columns?
Which is the bound column?
Please post its row source.
Make sure it is unbound (its control source is empty)


Jeanette Cunningham

Lisa said:
Jeanette, I have tried this: in the criteria for the dates I left the
reference to the form and I have disactivated the combobox for Causali
(Motivation in Italian) - I've set the criteria to [Motivo] and IT WORKS!
I get the right dates and the right Causali... so I guess the error is in
the combobox. If I run the query any other way I get a blank form.... does
this help?


Lisa said:
Jeanette, this way of formatting the date was given to me because,
apparently, queries will only accept a certain date format. I will try
what you just told me and let you know what the result is

thanks again
Jeanette Cunningham said:
Lisa,
I am not sure why you had the dates with a format expression like
"\#yyyy\-mm\-dd\#"

It seems to work better without any format for the dates as shown below.

=[Forms]![Reference]![DataDa]
And
Anagrafica.SysDate<=[Forms]![Reference]![DataA]

Was there a particular problem with the query and "\#yyyy\-mm\-dd\#" was
added to try to fix it?


Jeanette Cunningham

Hello Jeanette. I've gone thru all the checks, many times, I have asked
other people to check for typos. I am sure that all the fields are
named
correctly, and also the formats are correct. Still I get the same error
message.
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no
typos
The end date control on the form is called DataA - make sure no typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from here)

=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Hello Jeanette, my form has 2 text boxes (1 for the start date, 1 for
the
end date) and 1 combobox (which works properly). I refered my query
to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression
to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql
of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON
Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

message
Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" &
Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date
from
and to
(in the query criteria >[from] And [to]. I would like the selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether
it
is
really necessary
 
L

Lisa

Jeanette, it is unbound, this is the row source:

SELECT [Causali].[CausaleID], [Causali].[Causale] FROM Causali ORDER BY
[Causale];

1 bound column

Thanks


Jeanette Cunningham said:
Lisa,
that combo - how many columns?
Which is the bound column?
Please post its row source.
Make sure it is unbound (its control source is empty)


Jeanette Cunningham

Lisa said:
Jeanette, I have tried this: in the criteria for the dates I left the
reference to the form and I have disactivated the combobox for Causali
(Motivation in Italian) - I've set the criteria to [Motivo] and IT WORKS!
I get the right dates and the right Causali... so I guess the error is in
the combobox. If I run the query any other way I get a blank form....
does this help?


Lisa said:
Jeanette, this way of formatting the date was given to me because,
apparently, queries will only accept a certain date format. I will try
what you just told me and let you know what the result is

thanks again
Lisa,
I am not sure why you had the dates with a format expression like
"\#yyyy\-mm\-dd\#"

It seems to work better without any format for the dates as shown
below.

=[Forms]![Reference]![DataDa]
And
Anagrafica.SysDate<=[Forms]![Reference]![DataA]

Was there a particular problem with the query and "\#yyyy\-mm\-dd\#"
was added to try to fix it?


Jeanette Cunningham

Hello Jeanette. I've gone thru all the checks, many times, I have
asked
other people to check for typos. I am sure that all the fields are
named
correctly, and also the formats are correct. Still I get the same
error
message.
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no
typos
The end date control on the form is called DataA - make sure no typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from here)

=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Hello Jeanette, my form has 2 text boxes (1 for the start date, 1
for
the
end date) and 1 combobox (which works properly). I refered my query
to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression
to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql
of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON
Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

message
Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" &
Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date
from
and to
(in the query criteria >[from] And [to]. I would like the selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether
it
is
really necessary
 
J

Jeanette Cunningham

Lisa,
change this part of the where clause
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals])

to

WHERE (((Causali.CausaleID)=[Forms]![Reference]![Causals])

the bound column of the combo is 1,
=[Forms]![Reference]![Causals] looks at the 1st column of the combo where
the CausaleID is (not the Causale)

Jeanette Cunningham

Lisa said:
Jeanette, it is unbound, this is the row source:

SELECT [Causali].[CausaleID], [Causali].[Causale] FROM Causali ORDER BY
[Causale];

1 bound column

Thanks


Jeanette Cunningham said:
Lisa,
that combo - how many columns?
Which is the bound column?
Please post its row source.
Make sure it is unbound (its control source is empty)


Jeanette Cunningham

Lisa said:
Jeanette, I have tried this: in the criteria for the dates I left the
reference to the form and I have disactivated the combobox for Causali
(Motivation in Italian) - I've set the criteria to [Motivo] and IT
WORKS! I get the right dates and the right Causali... so I guess the
error is in the combobox. If I run the query any other way I get a blank
form.... does this help?


Jeanette, this way of formatting the date was given to me because,
apparently, queries will only accept a certain date format. I will try
what you just told me and let you know what the result is

thanks again
Lisa,
I am not sure why you had the dates with a format expression like
"\#yyyy\-mm\-dd\#"

It seems to work better without any format for the dates as shown
below.

=[Forms]![Reference]![DataDa]
And
Anagrafica.SysDate<=[Forms]![Reference]![DataA]

Was there a particular problem with the query and "\#yyyy\-mm\-dd\#"
was added to try to fix it?


Jeanette Cunningham

Hello Jeanette. I've gone thru all the checks, many times, I have
asked
other people to check for typos. I am sure that all the fields are
named
correctly, and also the formats are correct. Still I get the same
error
message.
message
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no
typos
The end date control on the form is called DataA - make sure no
typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from
here)

=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Hello Jeanette, my form has 2 text boxes (1 for the start date, 1
for
the
end date) and 1 combobox (which works properly). I refered my query
to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the expression
to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the sql
of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON
Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

message
Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need
one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" &
Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter
Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date
from
and to
(in the query criteria >[from] And [to]. I would like the
selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think whether
it
is
really necessary
 
L

Lisa

I WORKS!!!! thanks you so much!!!!
Jeanette Cunningham said:
Lisa,
change this part of the where clause
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals])

to

WHERE (((Causali.CausaleID)=[Forms]![Reference]![Causals])

the bound column of the combo is 1,
=[Forms]![Reference]![Causals] looks at the 1st column of the combo where
the CausaleID is (not the Causale)

Jeanette Cunningham

Lisa said:
Jeanette, it is unbound, this is the row source:

SELECT [Causali].[CausaleID], [Causali].[Causale] FROM Causali ORDER BY
[Causale];

1 bound column

Thanks


Jeanette Cunningham said:
Lisa,
that combo - how many columns?
Which is the bound column?
Please post its row source.
Make sure it is unbound (its control source is empty)


Jeanette Cunningham

Jeanette, I have tried this: in the criteria for the dates I left the
reference to the form and I have disactivated the combobox for Causali
(Motivation in Italian) - I've set the criteria to [Motivo] and IT
WORKS! I get the right dates and the right Causali... so I guess the
error is in the combobox. If I run the query any other way I get a
blank
form.... does this help?


Jeanette, this way of formatting the date was given to me because,
apparently, queries will only accept a certain date format. I will try
what you just told me and let you know what the result is

thanks again
Lisa,
I am not sure why you had the dates with a format expression like
"\#yyyy\-mm\-dd\#"

It seems to work better without any format for the dates as shown
below.

=[Forms]![Reference]![DataDa]
And
Anagrafica.SysDate<=[Forms]![Reference]![DataA]

Was there a particular problem with the query and "\#yyyy\-mm\-dd\#"
was added to try to fix it?


Jeanette Cunningham

Hello Jeanette. I've gone thru all the checks, many times, I have
asked
other people to check for typos. I am sure that all the fields are
named
correctly, and also the formats are correct. Still I get the same
error
message.
message
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no
typos
The end date control on the form is called DataA - make sure no
typos
In the table Anagrafica, the field SysDate is a date time data type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from
here)

=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Hello Jeanette, my form has 2 text boxes (1 for the start date, 1
for
the
end date) and 1 combobox (which works properly). I refered my
query
to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many complicated
elements.
Try simplifying the expression by assigning parts of the
expression
to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the
sql
of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON
Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

message
Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need
one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" &
Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter
Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a date
from
and to
(in the query criteria >[from] And [to]. I would like the
selected
period to
be shown in the report. Is this possible (and if so... how can I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think
whether
it
is
really necessary
 
J

Jeanette Cunningham

You're very welcome

Jeanette Cunningham

Lisa said:
I WORKS!!!! thanks you so much!!!!
Jeanette Cunningham said:
Lisa,
change this part of the where clause
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals])

to

WHERE (((Causali.CausaleID)=[Forms]![Reference]![Causals])

the bound column of the combo is 1,
=[Forms]![Reference]![Causals] looks at the 1st column of the combo where
the CausaleID is (not the Causale)

Jeanette Cunningham

Lisa said:
Jeanette, it is unbound, this is the row source:

SELECT [Causali].[CausaleID], [Causali].[Causale] FROM Causali ORDER BY
[Causale];

1 bound column

Thanks


Lisa,
that combo - how many columns?
Which is the bound column?
Please post its row source.
Make sure it is unbound (its control source is empty)


Jeanette Cunningham

Jeanette, I have tried this: in the criteria for the dates I left the
reference to the form and I have disactivated the combobox for
Causali
(Motivation in Italian) - I've set the criteria to [Motivo] and IT
WORKS! I get the right dates and the right Causali... so I guess the
error is in the combobox. If I run the query any other way I get a
blank
form.... does this help?


Jeanette, this way of formatting the date was given to me because,
apparently, queries will only accept a certain date format. I will
try
what you just told me and let you know what the result is

thanks again
message
Lisa,
I am not sure why you had the dates with a format expression like
"\#yyyy\-mm\-dd\#"

It seems to work better without any format for the dates as shown
below.

=[Forms]![Reference]![DataDa]
And
Anagrafica.SysDate<=[Forms]![Reference]![DataA]

Was there a particular problem with the query and "\#yyyy\-mm\-dd\#"
was added to try to fix it?


Jeanette Cunningham

Hello Jeanette. I've gone thru all the checks, many times, I have
asked
other people to check for typos. I am sure that all the fields are
named
correctly, and also the formats are correct. Still I get the same
error
message.
message
Lisa,
Check the following:
Reference is the name of your form - make sure no typos
The two date textboxes are on the main form and not on a subform.
The start date control on the form is called DataDa - make sure no
typos
The end date control on the form is called DataA - make sure no
typos
In the table Anagrafica, the field SysDate is a date time data
type

If pass all the above checks,
try this in the criteia row for SysDate (copy and paste it from
here)

=Format([Forms]![Reference]![DataDa],"\#mm\/dd\/yyyy\#")
And
Anagrafica.SysDate<=Format([Forms]![Reference]![DataA],"\#mm\/dd\/yyyy\#")

Jeanette Cunningham


Hello Jeanette, my form has 2 text boxes (1 for the start date, 1
for
the
end date) and 1 combobox (which works properly). I refered my
query
to
those boxes but all i get is an error message which says:

"This expression is typed incorrectly, or it is too complex to be
evaluated.
For example, a numeric expression may contain too many
complicated
elements.
Try simplifying the expression by assigning parts of the
expression
to
variables."

This is what I input in the dates criteria :

">=Format([Forms]![Reference]![DataDa], "\#yyyy\-mm\-dd\#") And <
Format([Forms]![Reference]![DataA], "\#yyyy\-mm\-dd\#")"

as suggested to me by Doug Steele. He also asked me to show the
sql
of
my
query which is:

SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo,
Anagrafica.[Cap&Citta], Anagrafica.Provincia, Anagrafica.SysDate,
Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON
Causali.CausaleID
=
Transazioni.CausaleID
WHERE (((Causali.Causale)=[Forms]![Reference]![Causals]) AND
((Anagrafica.SysDate)>=Format([Forms]![Reference]![DataDa],"\#yyyy-mm-dd\#")
And
(Anagrafica.SysDate)<Format([Forms]![Reference]![DataA],"\#yyyy-mm-dd\#")))
ORDER BY Transazioni.Datas;

But nothing seems to help....

Thanks for helping

Lisa

message
Lisa,
Put the combo on the form.
You can use the wizard to build it. Select the combo tool.
Choose the option to use a list based on a table or query.
When you have this working, to filter between 2 dates, you need
one
combo
for the start date and another combo for the end date.

Your parameters will be something like this
= "#" & Me.TheStartDateControl & "#" And <= "#" &
Me.TheEndDateControl
&
"#"
Note: the date must be formatted specially:
Either in US date format - m/d/yyyy or yyyy/m/d


Jeanette Cunningham


Hello everybody, I have a question concerning the "Enter
Parameter
Value"
window that opens when I run a query. I have asked this in the
access.queries newsgroup but I couldn't get the answer.

Is it possible to have that as a combobox so that a list of
possibilities is shown?

Another question has to do with the same query. This asks a
date
from
and to
(in the query criteria >[from] And [to]. I would like the
selected
period to
be shown in the report. Is this possible (and if so... how can
I
achieve
that)?

Thanks for all the help you can give

--
Lisa
Save the Dogs Onlus - www.savethedogs.eu

THINK BEFORE YOU PRINT: before printing this e-mail think
whether
it
is
really necessary
 

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

Similar Threads

combobox in query 14
status bar 2
completing a query 10
Status Bar 1
filter query on combo box in a continuous subform 0
Using a form to enter criteria 3
Requery form 3
Parameter Query on a Form 10

Top