recieving error when running query

Chimp8471

Registered User.
Local time
Today, 21:55
Joined
Mar 18, 2003
Messages
353
I am getting an error when i try to use two dates that are entered into a form

Error

error2.jpg


my form name is frm_LME

and my text boxes on the form are called


Datestart
DateEnd


and the query i am trying to run is as follows:

Between [Forms]![frm_LME]![DateStart] And [Forms]![frm_LME]![Dateend]


can anyone see where i am going wrong please
 
The actual error might be helpful. ;)
 
it's in the picture above!!!! isn't it???

hmmm.....now i am confused,

anyway the message i get is:


the microsoft jet database engine does not recognise [forms]![frm_LME]![DateStart] as a valid field name or expression.

this is a query of a crosstab query, not sure if that makes a difference, but if so how can i work around this.
 
so are you saying that the line

Between [Forms]![frm_LME]![DateStart] And [Forms]![frm_LME]![Dateend]

should go in the cross tab query ???
 
right here goes......

i have a number of queries.

queryLME2 - (Works Fine)


Daycode, Line, Machine, TtlTime: [tblEvents]![MinorStop]+[tblEvents]![MajorStop]+[tblEvents]![Breakdowns]+[tblEvents]![CIP]+[tblEvents]![ProductChange]+[tblEvents]![Maintenance]

LME Crosstab

Daycode - Row Heading - queryLME2 - groupby
Line - Row Heading - queryLME2 - groupby
Machine - Colomn Heading - queryLME2 - groupby
PlannedTime -Row Heading - tblProduction - groupby
Impressions -Row Heading - tblProduction - groupby
Sum of Time - Value - queryLME2 - sum
Total Of TtlTime: Sum([TetraLME2]![SumOfTtlTime]) - Expression - Row heading


LME Final: (Query) all data taken from the crosstab above

Daycode
Line
Planned time
Impressions
Downtime
Line Lme
Machine1LME
Machine2LME
and so on.......

it all works fine UNTIL i put the date reference in, as soon as i use


Between [Forms]![frm_LME]![DateStart] And [Forms]![frm_LME]![Dateend]


it all falls apart on me and it stops.

HELP!!!!
 
Last edited:
Open the crosstab query in Design View. Choose menu Query, Parameters...

In the dialog box that pops up,
type [Forms]![frm_LME]![DateStart] in the Parameter column, and select the correct data type in the Data Type column.

Repeat for the other parameter [Forms]![frm_LME]![DateEnd]
 
on a plus side that kinda worked........i didn't get the error mesage this time,

but on a downside,

it didn't filter my data either between the 2 date ranges, i got all my data for every day.

any other suggestions please!!!
 

Users who are viewing this thread

Back
Top Bottom