Re: Form to query
- From: "Lisa" <Lisa@xxxxxxxxxxxxxx>
- Date: Fri, 15 Feb 2008 22:19:03 +0100
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" <nnn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23$lEFWBcIHA.5208@xxxxxxxxxxxxxxxxxxxxxxx
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" <Lisa@xxxxxxxxxxxxxx> wrote in message
news:_Nmtj.32288$Xg7.17718@xxxxxxxxxxxxxxxxxxxxxxxx
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" <Lisa@xxxxxxxxxxxxxx> wrote in message
news:tg_sj.30813$Xg7.16654@xxxxxxxxxxxxxxxxxxxxxxxx
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" <nnn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:uSxz$HrbIHA.5248@xxxxxxxxxxxxxxxxxxxxxxx
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" <Lisa@xxxxxxxxxxxxxx> wrote in message
news:35Hsj.29688$Xg7.19128@xxxxxxxxxxxxxxxxxxxxxxxx
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" <nnn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23w$jwDDbIHA.5976@xxxxxxxxxxxxxxxxxxxxxxx
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" <Lisa@xxxxxxxxxxxxxx> wrote in message
news:lKJrj.25465$Xg7.21941@xxxxxxxxxxxxxxxxxxxxxxxx
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" <nnn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:%23i0AaXCbIHA.4144@xxxxxxxxxxxxxxxxxxxxxxx
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 <= "#" &Note: the date must be formatted specially:
Me.TheEndDateControl
&
"#"
Either in US date format - m/d/yyyy or yyyy/m/d
Jeanette Cunningham
"Lisa" <Lisa@xxxxxxxxxxxxxx> wrote in message
news:_NIrj.25310$Xg7.3035@xxxxxxxxxxxxxxxxxxxxxxxx
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
.
- Follow-Ups:
- Re: Form to query
- From: Jeanette Cunningham
- Re: Form to query
- References:
- Form to query
- From: Lisa
- Re: Form to query
- From: Jeanette Cunningham
- Re: Form to query
- From: Lisa
- Re: Form to query
- From: Jeanette Cunningham
- Re: Form to query
- From: Lisa
- Re: Form to query
- From: Jeanette Cunningham
- Re: Form to query
- From: Lisa
- Re: Form to query
- From: Lisa
- Re: Form to query
- From: Jeanette Cunningham
- Form to query
- Prev by Date: Re: Form to query
- Next by Date: Slow Closing of Form
- Previous by thread: Re: Form to query
- Next by thread: Re: Form to query
- Index(es):
Relevant Pages
|
|