Parameterform

  • Thread starter Thread starter hermie
  • Start date Start date
H

hermie

Hello

I have created a parameter form with 2 comboboxes to select a date When I
run the report which calls the parameterform I can select the 2 dates but
get no results in the report. In the query I put in the datefield the 2
arguments eg between [forms]![paramform]!cboselectfirst] and
[forms]![paramform]!cboselectsecond]
The dates in the comboboxes are selected from a query which shows the begin
and end dates of the months.
Why do i not see any results?

Herman
 
Hi Roger

here are the rowsources of the combo boxes
SELECT [begin en eind datum].begin FROM [begin en eind datum];
SELECT [begin en eind datum].Einde FROM [begin en eind datum];

The query shows the begin and end dates of the month of this year like
01-jan-04 and 31-jan-04

Herman
Roger Carlson said:
Are you sure you are returning dates? Some functions (like Format) actually
change them to text. You might want to post the RowSource for the combo
boxes.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
Hello

I have created a parameter form with 2 comboboxes to select a date When I
run the report which calls the parameterform I can select the 2 dates but
get no results in the report. In the query I put in the datefield the 2
arguments eg between [forms]![paramform]!cboselectfirst] and
[forms]![paramform]!cboselectsecond]
The dates in the comboboxes are selected from a query which shows the begin
and end dates of the months.
Why do i not see any results?

Herman
 
Yes, but are they "date" dates or "text" dates?

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
Hi Roger

here are the rowsources of the combo boxes
SELECT [begin en eind datum].begin FROM [begin en eind datum];
SELECT [begin en eind datum].Einde FROM [begin en eind datum];

The query shows the begin and end dates of the month of this year like
01-jan-04 and 31-jan-04

Herman
Roger Carlson said:
Are you sure you are returning dates? Some functions (like Format) actually
change them to text. You might want to post the RowSource for the combo
boxes.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
When
I
run the report which calls the parameterform I can select the 2 dates but
get no results in the report. In the query I put in the datefield the 2
arguments eg between [forms]![paramform]!cboselectfirst] and
[forms]![paramform]!cboselectsecond]
The dates in the comboboxes are selected from a query which shows the begin
and end dates of the months.
Why do i not see any results?

Herman
 
The dates in the query are dates no text
and stranger is that i have it working now, but only select the date from
the comboboxes and not the dates between combobox1 and combobox2?

herman


Roger Carlson said:
Yes, but are they "date" dates or "text" dates?

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
Hi Roger

here are the rowsources of the combo boxes
SELECT [begin en eind datum].begin FROM [begin en eind datum];
SELECT [begin en eind datum].Einde FROM [begin en eind datum];

The query shows the begin and end dates of the month of this year like
01-jan-04 and 31-jan-04

Herman
Roger Carlson said:
Are you sure you are returning dates? Some functions (like Format) actually
change them to text. You might want to post the RowSource for the combo
boxes.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Hello

I have created a parameter form with 2 comboboxes to select a date
When
I
run the report which calls the parameterform I can select the 2
dates
but
get no results in the report. In the query I put in the datefield
the
2
arguments eg between [forms]![paramform]!cboselectfirst] and
[forms]![paramform]!cboselectsecond]
The dates in the comboboxes are selected from a query which shows the
begin
and end dates of the months.
Why do i not see any results?

Herman
 
Post your exact SQL.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
The dates in the query are dates no text
and stranger is that i have it working now, but only select the date from
the comboboxes and not the dates between combobox1 and combobox2?

herman


Roger Carlson said:
Yes, but are they "date" dates or "text" dates?

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
Hi Roger

here are the rowsources of the combo boxes
SELECT [begin en eind datum].begin FROM [begin en eind datum];
SELECT [begin en eind datum].Einde FROM [begin en eind datum];

The query shows the begin and end dates of the month of this year like
01-jan-04 and 31-jan-04

Herman
Are you sure you are returning dates? Some functions (like Format)
actually
change them to text. You might want to post the RowSource for the combo
boxes.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Hello

I have created a parameter form with 2 comboboxes to select a date When
I
run the report which calls the parameterform I can select the 2 dates
but
get no results in the report. In the query I put in the datefield
the
2
arguments eg between [forms]![paramform]!cboselectfirst] and
[forms]![paramform]!cboselectsecond]
The dates in the comboboxes are selected from a query which shows the
begin
and end dates of the months.
Why do i not see any results?

Herman
 
SQL of query begin en eind datum
SELECT calendario.date1, ([date1])-Day([Date1])+1 AS [begin],
DateSerial(Year([date1]),Month([Date1])+1,0) AS Einde
FROM calendario;

SQL of report source
SELECT [students activo].ss, [students activo].Grupo, [nombre] & " " &
[ApellidoP] & " " & [ApellidoM] AS Name, [students activo].Nombre, [students
activo].ApellidoP, [students activo].ApellidoM, [fecha
ausentes].fecha_ausent, IIf([fecha_ausent] Between #8/1/2004# And
#12/31/2004#,1,0) AS [1er Semestre], IIf([fecha_AUSENT] Between #1/1/2005#
And #5/31/2005#,1,0) AS [2do Semestre], IIf([fecha_ausent]=True,1,0) AS aan,
[fecha ausentes].razón
FROM [students activo] INNER JOIN [fecha ausentes] ON [students activo].ss =
[fecha ausentes].ss
WHERE ((([fecha ausentes].fecha_ausent) Between
[Forms]![paramform]![cboselectfirst] And
[Forms]![paramform]![cboselectsecond]))
ORDER BY [students activo].Grupo, [nombre] & " " & [ApellidoP] & " " &
[ApellidoM], [students activo].Nombre, [students activo].ApellidoP,
[students activo].ApellidoM;

Hope this help yoo

Herman

Roger Carlson said:
Post your exact SQL.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
The dates in the query are dates no text
and stranger is that i have it working now, but only select the date from
the comboboxes and not the dates between combobox1 and combobox2?

herman


Roger Carlson said:
Yes, but are they "date" dates or "text" dates?

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Hi Roger

here are the rowsources of the combo boxes
SELECT [begin en eind datum].begin FROM [begin en eind datum];
SELECT [begin en eind datum].Einde FROM [begin en eind datum];

The query shows the begin and end dates of the month of this year like
01-jan-04 and 31-jan-04

Herman
Are you sure you are returning dates? Some functions (like Format)
actually
change them to text. You might want to post the RowSource for the combo
boxes.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Hello

I have created a parameter form with 2 comboboxes to select a date
When
I
run the report which calls the parameterform I can select the 2 dates
but
get no results in the report. In the query I put in the
datefield
the
2
arguments eg between [forms]![paramform]!cboselectfirst] and
[forms]![paramform]!cboselectsecond]
The dates in the comboboxes are selected from a query which
shows
the
begin
and end dates of the months.
Why do i not see any results?

Herman
 
Try adding # signs around your parameters

WHERE ((([fecha ausentes].fecha_ausent) Between
#[Forms]![paramform]![cboselectfirst]# And
#[Forms]![paramform]![cboselectsecond]#))


--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
SQL of query begin en eind datum
SELECT calendario.date1, ([date1])-Day([Date1])+1 AS [begin],
DateSerial(Year([date1]),Month([Date1])+1,0) AS Einde
FROM calendario;

SQL of report source
SELECT [students activo].ss, [students activo].Grupo, [nombre] & " " &
[ApellidoP] & " " & [ApellidoM] AS Name, [students activo].Nombre, [students
activo].ApellidoP, [students activo].ApellidoM, [fecha
ausentes].fecha_ausent, IIf([fecha_ausent] Between #8/1/2004# And
#12/31/2004#,1,0) AS [1er Semestre], IIf([fecha_AUSENT] Between #1/1/2005#
And #5/31/2005#,1,0) AS [2do Semestre], IIf([fecha_ausent]=True,1,0) AS aan,
[fecha ausentes].razón
FROM [students activo] INNER JOIN [fecha ausentes] ON [students activo].ss =
[fecha ausentes].ss
WHERE ((([fecha ausentes].fecha_ausent) Between
[Forms]![paramform]![cboselectfirst] And
[Forms]![paramform]![cboselectsecond]))
ORDER BY [students activo].Grupo, [nombre] & " " & [ApellidoP] & " " &
[ApellidoM], [students activo].Nombre, [students activo].ApellidoP,
[students activo].ApellidoM;

Hope this help yoo

Herman

Roger Carlson said:
Post your exact SQL.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
The dates in the query are dates no text
and stranger is that i have it working now, but only select the date from
the comboboxes and not the dates between combobox1 and combobox2?

herman


Yes, but are they "date" dates or "text" dates?

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Hi Roger

here are the rowsources of the combo boxes
SELECT [begin en eind datum].begin FROM [begin en eind datum];
SELECT [begin en eind datum].Einde FROM [begin en eind datum];

The query shows the begin and end dates of the month of this year like
01-jan-04 and 31-jan-04

Herman
Are you sure you are returning dates? Some functions (like Format)
actually
change them to text. You might want to post the RowSource for the
combo
boxes.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Hello

I have created a parameter form with 2 comboboxes to select a date
When
I
run the report which calls the parameterform I can select the 2
dates
but
get no results in the report. In the query I put in the datefield
the
2
arguments eg between [forms]![paramform]!cboselectfirst] and
[forms]![paramform]!cboselectsecond]
The dates in the comboboxes are selected from a query which shows
the
begin
and end dates of the months.
Why do i not see any results?

Herman
 
Hello Roger

I put the # signs but then get Syntax error in data in query expression when
running the report.
So this not works

herman

Roger Carlson said:
Try adding # signs around your parameters

WHERE ((([fecha ausentes].fecha_ausent) Between
#[Forms]![paramform]![cboselectfirst]# And
#[Forms]![paramform]![cboselectsecond]#))


--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
SQL of query begin en eind datum
SELECT calendario.date1, ([date1])-Day([Date1])+1 AS [begin],
DateSerial(Year([date1]),Month([Date1])+1,0) AS Einde
FROM calendario;

SQL of report source
SELECT [students activo].ss, [students activo].Grupo, [nombre] & " " &
[ApellidoP] & " " & [ApellidoM] AS Name, [students activo].Nombre, [students
activo].ApellidoP, [students activo].ApellidoM, [fecha
ausentes].fecha_ausent, IIf([fecha_ausent] Between #8/1/2004# And
#12/31/2004#,1,0) AS [1er Semestre], IIf([fecha_AUSENT] Between #1/1/2005#
And #5/31/2005#,1,0) AS [2do Semestre], IIf([fecha_ausent]=True,1,0) AS aan,
[fecha ausentes].razón
FROM [students activo] INNER JOIN [fecha ausentes] ON [students
activo].ss
=
[fecha ausentes].ss
WHERE ((([fecha ausentes].fecha_ausent) Between
[Forms]![paramform]![cboselectfirst] And
[Forms]![paramform]![cboselectsecond]))
ORDER BY [students activo].Grupo, [nombre] & " " & [ApellidoP] & " " &
[ApellidoM], [students activo].Nombre, [students activo].ApellidoP,
[students activo].ApellidoM;

Hope this help yoo

Herman

Roger Carlson said:
Post your exact SQL.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

The dates in the query are dates no text
and stranger is that i have it working now, but only select the date from
the comboboxes and not the dates between combobox1 and combobox2?

herman


Yes, but are they "date" dates or "text" dates?

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Hi Roger

here are the rowsources of the combo boxes
SELECT [begin en eind datum].begin FROM [begin en eind datum];
SELECT [begin en eind datum].Einde FROM [begin en eind datum];

The query shows the begin and end dates of the month of this
year
like
01-jan-04 and 31-jan-04

Herman
Are you sure you are returning dates? Some functions (like Format)
actually
change them to text. You might want to post the RowSource for
the a
date
the
2
dates
but
get no results in the report. In the query I put in the datefield
the
2
arguments eg between [forms]![paramform]!cboselectfirst] and
[forms]![paramform]!cboselectsecond]
The dates in the comboboxes are selected from a query which shows
the
begin
and end dates of the months.
Why do i not see any results?

Herman
 
Hello Roger

To inform you it is working now, there was a third query with wrong criteria
I removed it and now it is working
Thank you for all your help and suggestions.

Herman

hermie said:
Hello Roger

I put the # signs but then get Syntax error in data in query expression when
running the report.
So this not works

herman

Roger Carlson said:
Try adding # signs around your parameters

WHERE ((([fecha ausentes].fecha_ausent) Between
#[Forms]![paramform]![cboselectfirst]# And
#[Forms]![paramform]![cboselectsecond]#))


--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

hermie said:
SQL of query begin en eind datum
SELECT calendario.date1, ([date1])-Day([Date1])+1 AS [begin],
DateSerial(Year([date1]),Month([Date1])+1,0) AS Einde
FROM calendario;

SQL of report source
SELECT [students activo].ss, [students activo].Grupo, [nombre] & " " &
[ApellidoP] & " " & [ApellidoM] AS Name, [students activo].Nombre, [students
activo].ApellidoP, [students activo].ApellidoM, [fecha
ausentes].fecha_ausent, IIf([fecha_ausent] Between #8/1/2004# And
#12/31/2004#,1,0) AS [1er Semestre], IIf([fecha_AUSENT] Between #1/1/2005#
And #5/31/2005#,1,0) AS [2do Semestre], IIf([fecha_ausent]=True,1,0)
AS
aan,
[fecha ausentes].razón
FROM [students activo] INNER JOIN [fecha ausentes] ON [students
activo].ss
=
[fecha ausentes].ss
WHERE ((([fecha ausentes].fecha_ausent) Between
[Forms]![paramform]![cboselectfirst] And
[Forms]![paramform]![cboselectsecond]))
ORDER BY [students activo].Grupo, [nombre] & " " & [ApellidoP] & " " &
[ApellidoM], [students activo].Nombre, [students activo].ApellidoP,
[students activo].ApellidoM;

Hope this help yoo

Herman

Post your exact SQL.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

The dates in the query are dates no text
and stranger is that i have it working now, but only select the date
from
the comboboxes and not the dates between combobox1 and combobox2?

herman


Yes, but are they "date" dates or "text" dates?

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Hi Roger

here are the rowsources of the combo boxes
SELECT [begin en eind datum].begin FROM [begin en eind datum];
SELECT [begin en eind datum].Einde FROM [begin en eind datum];

The query shows the begin and end dates of the month of this year
like
01-jan-04 and 31-jan-04

Herman
Are you sure you are returning dates? Some functions (like
Format)
actually
change them to text. You might want to post the RowSource
for select
a
date
When
I
run the report which calls the parameterform I can select
the
2
dates
but
get no results in the report. In the query I put in the
datefield
the
2
arguments eg between [forms]![paramform]!cboselectfirst] and
[forms]![paramform]!cboselectsecond]
The dates in the comboboxes are selected from a query which
shows
the
begin
and end dates of the months.
Why do i not see any results?

Herman
 
Back
Top