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