repost of Queries & Combo Box & Reports

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

hermie

I read this post and fredg replied on this
I implemented all, created paramform etc. but when I run the report or
paraform I cannot select an item in the combobox? what do i wrong?

Hermie
 
I read this post and fredg replied on this
I implemented all, created paramform etc. but when I run the report or
paraform I cannot select an item in the combobox? what do i wrong?

Hermie
What is 'this post' as in "I read this post "?

I certainly don't know what you did wrong (my crystal ball doesn't
work on Tuesdays).
You haven't included anything from whatever previous post you are
referring to, so neither can anyone else know what is wrong.

Why not start with stating your problem and include the message with
my reply so we'll all know what you are talking about. Then perhaps we
can help.
 
Soory to not reply to the original post
Here it is
I have a table which feeds a query that has data for 5
locations. I need to create a query with a combo box that
asks the user to enter their desired location and other
aspects to return a report with only the locations they
want to look at. How can I do this. Thanks for any help.

You can adapt this for your needs.

Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Query (the Report's Record Source) [CompanyID] field criteria
line write:
forms!ParamForm!FindCompany

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.
You never see the query.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Basicly i want to do the same

I like to open a report or form by selecting a name in a combobox
Hope I am more clear now
 
Shot in the dark Hermie,

You've set up the form and the combo box, but you cannot select anything from it.
Correct??

If a form's "Allow Edits" property is set to "No", then you will not be able to select a value from
a combo box, whether it is bound or not. Change that form property to "Yes" and then you should be
able to select a value.

--
Jeff Conrad
Access Junkie
Bend, Oregon

hermie said:
Soory to not reply to the original post
Here it is
I have a table which feeds a query that has data for 5
locations. I need to create a query with a combo box that
asks the user to enter their desired location and other
aspects to return a report with only the locations they
want to look at. How can I do this. Thanks for any help.

You can adapt this for your needs.

Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Query (the Report's Record Source) [CompanyID] field criteria
line write:
forms!ParamForm!FindCompany

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.
You never see the query.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Basicly i want to do the same

I like to open a report or form by selecting a name in a combobox
Hope I am more clear now


fredg said:
What is 'this post' as in "I read this post "?

I certainly don't know what you did wrong (my crystal ball doesn't
work on Tuesdays).
You haven't included anything from whatever previous post you are
referring to, so neither can anyone else know what is wrong.

Why not start with stating your problem and include the message with
my reply so we'll all know what you are talking about. Then perhaps we
can help.
 
Nice shot Jeff but "allow edits" is standard set to yes when I created the
form But still cannot see the list

herman

Jeff Conrad said:
Shot in the dark Hermie,

You've set up the form and the combo box, but you cannot select anything from it.
Correct??

If a form's "Allow Edits" property is set to "No", then you will not be able to select a value from
a combo box, whether it is bound or not. Change that form property to "Yes" and then you should be
able to select a value.

--
Jeff Conrad
Access Junkie
Bend, Oregon

Soory to not reply to the original post
Here it is
I have a table which feeds a query that has data for 5
locations. I need to create a query with a combo box that
asks the user to enter their desired location and other
aspects to return a report with only the locations they
want to look at. How can I do this. Thanks for any help.

You can adapt this for your needs.

Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Query (the Report's Record Source) [CompanyID] field criteria
line write:
forms!ParamForm!FindCompany

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.
You never see the query.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Basicly i want to do the same

I like to open a report or form by selecting a name in a combobox
Hope I am more clear now


fredg said:
On Tue, 16 Nov 2004 14:11:32 -0400, hermie wrote:

I read this post and fredg replied on this
I implemented all, created paramform etc. but when I run the report or
paraform I cannot select an item in the combobox? what do i wrong?

Hermie
What is 'this post' as in "I read this post "?

I certainly don't know what you did wrong (my crystal ball doesn't
work on Tuesdays).
You haven't included anything from whatever previous post you are
referring to, so neither can anyone else know what is wrong.

Why not start with stating your problem and include the message with
my reply so we'll all know what you are talking about. Then perhaps we
can help.
 
Hi Hermie,

I think we're going to need more info then you are giving us.
You originally said you cannot select an item from the combo box.
Now you are saying you cannot 'see' the combo box.
Those are two completely different things!
Your last statement could also mean that you can see the combo box,
but do not see any values in it.

Can you step back and provide us with ALL the steps you have done so far
and also what *exactly* is the problem you are having?
Any error messages, does the report actually open, does the form actually open, etc?

The extra information will keep us from guessing what the issue may be.

--
Jeff Conrad
Access Junkie
Bend, Oregon

hermie said:
Nice shot Jeff but "allow edits" is standard set to yes when I created the
form But still cannot see the list

herman

Jeff Conrad said:
Shot in the dark Hermie,

You've set up the form and the combo box, but you cannot select anything from it.
Correct??

If a form's "Allow Edits" property is set to "No", then you will not be able to select a value from
a combo box, whether it is bound or not. Change that form property to "Yes" and then you should be
able to select a value.

--
Jeff Conrad
Access Junkie
Bend, Oregon

Soory to not reply to the original post
Here it is
On Thu, 12 Aug 2004 07:41:02 -0700, Polina wrote:

I have a table which feeds a query that has data for 5
locations. I need to create a query with a combo box that
asks the user to enter their desired location and other
aspects to return a report with only the locations they
want to look at. How can I do this. Thanks for any help.

You can adapt this for your needs.

Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Query (the Report's Record Source) [CompanyID] field criteria
line write:
forms!ParamForm!FindCompany

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.
You never see the query.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Basicly i want to do the same

I like to open a report or form by selecting a name in a combobox
Hope I am more clear now


On Tue, 16 Nov 2004 14:11:32 -0400, hermie wrote:

I read this post and fredg replied on this
I implemented all, created paramform etc. but when I run the report or
paraform I cannot select an item in the combobox? what do i wrong?

Hermie
What is 'this post' as in "I read this post "?

I certainly don't know what you did wrong (my crystal ball doesn't
work on Tuesdays).
You haven't included anything from whatever previous post you are
referring to, so neither can anyone else know what is wrong.

Why not start with stating your problem and include the message with
my reply so we'll all know what you are talking about. Then perhaps we
can help.
 
Hi Jeff

I can see the combobox but not its contents

Here are the steps I did.
1. create unbound form with combo box
2. set combobox row source properties (select
esctarea.IDstudent,esctarea.estudiante FROM esctarea;)
3. named combo box 'cbofind'
4 set bound column to 1 and column width to 0",1"
5 add an command button with click property me.visible = false
6 saved form as ParamForm

In this fase when I open the form I see the combobox and commandbutton but
the combox not have data

Next step
In the query (esctarea) i put in field IDstduent forms!ParamForm!cbofind

In the reports on open event I put: DoCmd.Openform "ParaForm", , , , ,
acDialog
In the reports on close event I put: DoCmd.Close acForm, "ParaForm"

When I open now the report the form ParamForm opens and cannot selct nothing
in the combobox???

Hope my steps are clear to you

Herman


Jeff Conrad said:
Hi Hermie,

I think we're going to need more info then you are giving us.
You originally said you cannot select an item from the combo box.
Now you are saying you cannot 'see' the combo box.
Those are two completely different things!
Your last statement could also mean that you can see the combo box,
but do not see any values in it.

Can you step back and provide us with ALL the steps you have done so far
and also what *exactly* is the problem you are having?
Any error messages, does the report actually open, does the form actually open, etc?

The extra information will keep us from guessing what the issue may be.

--
Jeff Conrad
Access Junkie
Bend, Oregon

Nice shot Jeff but "allow edits" is standard set to yes when I created the
form But still cannot see the list

herman

Jeff Conrad said:
Shot in the dark Hermie,

You've set up the form and the combo box, but you cannot select
anything
from it.
Correct??

If a form's "Allow Edits" property is set to "No", then you will not
be
able to select a value from
a combo box, whether it is bound or not. Change that form property to "Yes" and then you should be
able to select a value.

--
Jeff Conrad
Access Junkie
Bend, Oregon

Soory to not reply to the original post
Here it is
On Thu, 12 Aug 2004 07:41:02 -0700, Polina wrote:

I have a table which feeds a query that has data for 5
locations. I need to create a query with a combo box that
asks the user to enter their desired location and other
aspects to return a report with only the locations they
want to look at. How can I do this. Thanks for any help.

You can adapt this for your needs.

Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Query (the Report's Record Source) [CompanyID] field criteria
line write:
forms!ParamForm!FindCompany

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.
You never see the query.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Basicly i want to do the same

I like to open a report or form by selecting a name in a combobox
Hope I am more clear now


On Tue, 16 Nov 2004 14:11:32 -0400, hermie wrote:

I read this post and fredg replied on this
I implemented all, created paramform etc. but when I run the
report
or
paraform I cannot select an item in the combobox? what do i wrong?

Hermie
What is 'this post' as in "I read this post "?

I certainly don't know what you did wrong (my crystal ball doesn't
work on Tuesdays).
You haven't included anything from whatever previous post you are
referring to, so neither can anyone else know what is wrong.

Why not start with stating your problem and include the message with
my reply so we'll all know what you are talking about. Then perhaps we
can help.
 
Hi Hermie,

Ok, that helps.
I'll have to get back with you on this though, I'm heading South to take care of some major computer
problems.
Fred may jump in first though.

--
Jeff Conrad
Access Junkie
Bend, Oregon

hermie said:
Hi Jeff

I can see the combobox but not its contents

Here are the steps I did.
1. create unbound form with combo box
2. set combobox row source properties (select
esctarea.IDstudent,esctarea.estudiante FROM esctarea;)
3. named combo box 'cbofind'
4 set bound column to 1 and column width to 0",1"
5 add an command button with click property me.visible = false
6 saved form as ParamForm

In this fase when I open the form I see the combobox and commandbutton but
the combox not have data

Next step
In the query (esctarea) i put in field IDstduent forms!ParamForm!cbofind

In the reports on open event I put: DoCmd.Openform "ParaForm", , , , ,
acDialog
In the reports on close event I put: DoCmd.Close acForm, "ParaForm"

When I open now the report the form ParamForm opens and cannot selct nothing
in the combobox???

Hope my steps are clear to you

Herman


Jeff Conrad said:
Hi Hermie,

I think we're going to need more info then you are giving us.
You originally said you cannot select an item from the combo box.
Now you are saying you cannot 'see' the combo box.
Those are two completely different things!
Your last statement could also mean that you can see the combo box,
but do not see any values in it.

Can you step back and provide us with ALL the steps you have done so far
and also what *exactly* is the problem you are having?
Any error messages, does the report actually open, does the form actually open, etc?

The extra information will keep us from guessing what the issue may be.

--
Jeff Conrad
Access Junkie
Bend, Oregon

Nice shot Jeff but "allow edits" is standard set to yes when I created the
form But still cannot see the list

herman

Shot in the dark Hermie,

You've set up the form and the combo box, but you cannot select anything
from it.
Correct??

If a form's "Allow Edits" property is set to "No", then you will not be
able to select a value from
a combo box, whether it is bound or not. Change that form property to
"Yes" and then you should be
able to select a value.

--
Jeff Conrad
Access Junkie
Bend, Oregon

Soory to not reply to the original post
Here it is
On Thu, 12 Aug 2004 07:41:02 -0700, Polina wrote:

I have a table which feeds a query that has data for 5
locations. I need to create a query with a combo box that
asks the user to enter their desired location and other
aspects to return a report with only the locations they
want to look at. How can I do this. Thanks for any help.

You can adapt this for your needs.

Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Query (the Report's Record Source) [CompanyID] field criteria
line write:
forms!ParamForm!FindCompany

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.
You never see the query.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Basicly i want to do the same

I like to open a report or form by selecting a name in a combobox
Hope I am more clear now


On Tue, 16 Nov 2004 14:11:32 -0400, hermie wrote:

I read this post and fredg replied on this
I implemented all, created paramform etc. but when I run the report
or
paraform I cannot select an item in the combobox? what do i wrong?

Hermie
What is 'this post' as in "I read this post "?

I certainly don't know what you did wrong (my crystal ball doesn't
work on Tuesdays).
You haven't included anything from whatever previous post you are
referring to, so neither can anyone else know what is wrong.

Why not start with stating your problem and include the message with
my reply so we'll all know what you are talking about. Then perhaps we
can help.
 
Hi Jeff

I can see the combobox but not its contents

Here are the steps I did.
1. create unbound form with combo box
2. set combobox row source properties (select
esctarea.IDstudent,esctarea.estudiante FROM esctarea;)
3. named combo box 'cbofind'
4 set bound column to 1 and column width to 0",1"
5 add an command button with click property me.visible = false
6 saved form as ParamForm

In this fase when I open the form I see the combobox and commandbutton but
the combox not have data

Next step
In the query (esctarea) i put in field IDstduent forms!ParamForm!cbofind

In the reports on open event I put: DoCmd.Openform "ParaForm", , , , ,
acDialog
In the reports on close event I put: DoCmd.Close acForm, "ParaForm"

When I open now the report the form ParamForm opens and cannot selct nothing
in the combobox???

Hope my steps are clear to you

Herman
** snipped **

Hermie,

1) Did you also set the Column Count property to 2

2) Is esctarea the name of the table that the fields IDstudent and
estudiante are in?

Change the combo box Row Source to (all on one line):

select esctarea.IDstudent,esctarea.estudiante FROM esctarea Where
esctarea.IDstudent = forms!ParamForm!cbofind;

After you write the above directly on the combo box RowSource line
click on the button with the 3 dots that appears on that line.
Run the query that appears.
You should get prompted for the ID?
After entering a valid ID do you get the correct records returned?
If so, your rowsourse is OK. If not you have improperly written the
SQL, or you have no records to display for that ID.
You'll have to 'fix' it.
 
Hi fred

I changed the column count to 2 but have no effect
Esctarea is a query does this matter?

Here is the SQL view of the query

SELECT Students.IDstudent, [nombre] & " " & [apellidop] & " " & [apellidom]
AS estudiante, [tareas estudiantes].ss, Students.Grupo, Students.Nombre,
Students.ApellidoP, Students.ApellidoM, Students.activo, [tareas
estudiantes].fecha, [tareas estudiantes].esptarea, [tareas
estudiantes].puntos, [tareas estudiantes].valor, ([puntos]/[valor]) AS
[Percent], caltareas([Percent]) AS [Nota test]
FROM Students INNER JOIN [tareas estudiantes] ON (Students.ss = [tareas
estudiantes].ss) AND (Students.ss = [tareas estudiantes].ss)
WHERE (((Students.IDstudent)=[forms]![paramform]![cbofind]) AND
((Students.activo)=True))
ORDER BY [nombre] & " " & [apellidop] & " " & [apellidom], Students.Grupo;

I changed the rowsource with yours but not have effect too?

I made an testdatabase with only the items related If you want i can send a
copy is small

Herman
 
Hi fred

I changed the column count to 2 but have no effect
Esctarea is a query does this matter?

Here is the SQL view of the query

SELECT Students.IDstudent, [nombre] & " " & [apellidop] & " " & [apellidom]
AS estudiante, [tareas estudiantes].ss, Students.Grupo, Students.Nombre,
Students.ApellidoP, Students.ApellidoM, Students.activo, [tareas
estudiantes].fecha, [tareas estudiantes].esptarea, [tareas
estudiantes].puntos, [tareas estudiantes].valor, ([puntos]/[valor]) AS
[Percent], caltareas([Percent]) AS [Nota test]
FROM Students INNER JOIN [tareas estudiantes] ON (Students.ss = [tareas
estudiantes].ss) AND (Students.ss = [tareas estudiantes].ss)
WHERE (((Students.IDstudent)=[forms]![paramform]![cbofind]) AND
((Students.activo)=True))
ORDER BY [nombre] & " " & [apellidop] & " " & [apellidom], Students.Grupo;

I changed the rowsource with yours but not have effect too?

I made an testdatabase with only the items related If you want i can send a
copy is small

Herman

fredg said:
** snipped **

Hermie,

1) Did you also set the Column Count property to 2

2) Is esctarea the name of the table that the fields IDstudent and
estudiante are in?

Change the combo box Row Source to (all on one line):

select esctarea.IDstudent,esctarea.estudiante FROM esctarea Where
esctarea.IDstudent = forms!ParamForm!cbofind;

After you write the above directly on the combo box RowSource line
click on the button with the 3 dots that appears on that line.
Run the query that appears.
You should get prompted for the ID?
After entering a valid ID do you get the correct records returned?
If so, your rowsourse is OK. If not you have improperly written the
SQL, or you have no records to display for that ID.
You'll have to 'fix' it.

Ok. Send me the small database.
If you can Zip it, please do so. If not that's OK too.
Send it to (e-mail address removed)
Please MAKE SURE you write, as subject line "Hermie's database",
otherwise it will be deleted without my seeing it.
I'll post back here with what I've found.
 
Hi fred

I changed the column count to 2 but have no effect
Esctarea is a query does this matter?

Here is the SQL view of the query

SELECT Students.IDstudent, [nombre] & " " & [apellidop] & " " & [apellidom]
AS estudiante, [tareas estudiantes].ss, Students.Grupo, Students.Nombre,
Students.ApellidoP, Students.ApellidoM, Students.activo, [tareas
estudiantes].fecha, [tareas estudiantes].esptarea, [tareas
estudiantes].puntos, [tareas estudiantes].valor, ([puntos]/[valor]) AS
[Percent], caltareas([Percent]) AS [Nota test]
FROM Students INNER JOIN [tareas estudiantes] ON (Students.ss = [tareas
estudiantes].ss) AND (Students.ss = [tareas estudiantes].ss)
WHERE (((Students.IDstudent)=[forms]![paramform]![cbofind]) AND
((Students.activo)=True))
ORDER BY [nombre] & " " & [apellidop] & " " & [apellidom], Students.Grupo;

I changed the rowsource with yours but not have effect too?

I made an testdatabase with only the items related If you want i can send a
copy is small

Herman

fredg said:
** snipped **

Hermie,

1) Did you also set the Column Count property to 2

2) Is esctarea the name of the table that the fields IDstudent and
estudiante are in?

Change the combo box Row Source to (all on one line):

select esctarea.IDstudent,esctarea.estudiante FROM esctarea Where
esctarea.IDstudent = forms!ParamForm!cbofind;

After you write the above directly on the combo box RowSource line
click on the button with the 3 dots that appears on that line.
Run the query that appears.
You should get prompted for the ID?
After entering a valid ID do you get the correct records returned?
If so, your rowsourse is OK. If not you have improperly written the
SQL, or you have no records to display for that ID.
You'll have to 'fix' it.

Hermie,

The Rowsource data for the combo box should come from the Student
table, not from the Esctarea query.
The Students table was a hidden object.

Here is the rowsource for the [cbofind] combo box:

SELECT Students.IDstudent, [Nombre] & " " & [apellidop] & " " &
[apellidom] AS FullName FROM Students ORDER BY [Nombre] & " " &
[apellidop] & " " & [apellidom];

I kept the student name in the same order you had them in the report.
You can change the order of the names if you wish, for example:
[apellidop] & ", " [Nombre] & " " & [apellidom] AS FullName
(It would be easier to search by family name rather than first name,
but that choice is yours.)
If you do, also change the Order By to reflect the new name
arrangement.

Set the Bound Column property to 1.
Set the Column Count property to 2.
Set Column Widths to 0";1.5" (to show the names in full.)
Set the LimitToList peoperty to Yes.

Run the report. The report opens the ParamForm.
Select the student from the combo box.
Click the command button.
The report displays the selected students data.

If you still have difficulty let me know and I'll email you back your
working database, otherwise I'll delete it in a few days.

Good luck.
 
Thanks Fred works like charm
You can delete the file if you wish

Herman

fredg said:
Hi fred

I changed the column count to 2 but have no effect
Esctarea is a query does this matter?

Here is the SQL view of the query

SELECT Students.IDstudent, [nombre] & " " & [apellidop] & " " & [apellidom]
AS estudiante, [tareas estudiantes].ss, Students.Grupo, Students.Nombre,
Students.ApellidoP, Students.ApellidoM, Students.activo, [tareas
estudiantes].fecha, [tareas estudiantes].esptarea, [tareas
estudiantes].puntos, [tareas estudiantes].valor, ([puntos]/[valor]) AS
[Percent], caltareas([Percent]) AS [Nota test]
FROM Students INNER JOIN [tareas estudiantes] ON (Students.ss = [tareas
estudiantes].ss) AND (Students.ss = [tareas estudiantes].ss)
WHERE (((Students.IDstudent)=[forms]![paramform]![cbofind]) AND
((Students.activo)=True))
ORDER BY [nombre] & " " & [apellidop] & " " & [apellidom], Students.Grupo;

I changed the rowsource with yours but not have effect too?

I made an testdatabase with only the items related If you want i can send a
copy is small

Herman

fredg said:
On Wed, 17 Nov 2004 08:38:34 -0400, hermie wrote:

Hi Jeff

I can see the combobox but not its contents

Here are the steps I did.
1. create unbound form with combo box
2. set combobox row source properties (select
esctarea.IDstudent,esctarea.estudiante FROM esctarea;)
3. named combo box 'cbofind'
4 set bound column to 1 and column width to 0",1"
5 add an command button with click property me.visible = false
6 saved form as ParamForm

In this fase when I open the form I see the combobox and commandbutton but
the combox not have data

Next step
In the query (esctarea) i put in field IDstduent forms!ParamForm!cbofind

In the reports on open event I put: DoCmd.Openform "ParaForm", , , , ,
acDialog
In the reports on close event I put: DoCmd.Close acForm, "ParaForm"

When I open now the report the form ParamForm opens and cannot selct nothing
in the combobox???

Hope my steps are clear to you

Herman

** snipped **

Hermie,

1) Did you also set the Column Count property to 2

2) Is esctarea the name of the table that the fields IDstudent and
estudiante are in?

Change the combo box Row Source to (all on one line):

select esctarea.IDstudent,esctarea.estudiante FROM esctarea Where
esctarea.IDstudent = forms!ParamForm!cbofind;

After you write the above directly on the combo box RowSource line
click on the button with the 3 dots that appears on that line.
Run the query that appears.
You should get prompted for the ID?
After entering a valid ID do you get the correct records returned?
If so, your rowsourse is OK. If not you have improperly written the
SQL, or you have no records to display for that ID.
You'll have to 'fix' it.

Hermie,

The Rowsource data for the combo box should come from the Student
table, not from the Esctarea query.
The Students table was a hidden object.

Here is the rowsource for the [cbofind] combo box:

SELECT Students.IDstudent, [Nombre] & " " & [apellidop] & " " &
[apellidom] AS FullName FROM Students ORDER BY [Nombre] & " " &
[apellidop] & " " & [apellidom];

I kept the student name in the same order you had them in the report.
You can change the order of the names if you wish, for example:
[apellidop] & ", " [Nombre] & " " & [apellidom] AS FullName
(It would be easier to search by family name rather than first name,
but that choice is yours.)
If you do, also change the Order By to reflect the new name
arrangement.

Set the Bound Column property to 1.
Set the Column Count property to 2.
Set Column Widths to 0";1.5" (to show the names in full.)
Set the LimitToList peoperty to Yes.

Run the report. The report opens the ParamForm.
Select the student from the combo box.
Click the command button.
The report displays the selected students data.

If you still have difficulty let me know and I'll email you back your
working database, otherwise I'll delete it in a few days.

Good luck.
 
Fred
One additional question
Why does the combobox not work with a query? Now I have students in the list
which are not active.

Herman
fredg said:
Hi fred

I changed the column count to 2 but have no effect
Esctarea is a query does this matter?

Here is the SQL view of the query

SELECT Students.IDstudent, [nombre] & " " & [apellidop] & " " & [apellidom]
AS estudiante, [tareas estudiantes].ss, Students.Grupo, Students.Nombre,
Students.ApellidoP, Students.ApellidoM, Students.activo, [tareas
estudiantes].fecha, [tareas estudiantes].esptarea, [tareas
estudiantes].puntos, [tareas estudiantes].valor, ([puntos]/[valor]) AS
[Percent], caltareas([Percent]) AS [Nota test]
FROM Students INNER JOIN [tareas estudiantes] ON (Students.ss = [tareas
estudiantes].ss) AND (Students.ss = [tareas estudiantes].ss)
WHERE (((Students.IDstudent)=[forms]![paramform]![cbofind]) AND
((Students.activo)=True))
ORDER BY [nombre] & " " & [apellidop] & " " & [apellidom], Students.Grupo;

I changed the rowsource with yours but not have effect too?

I made an testdatabase with only the items related If you want i can send a
copy is small

Herman

fredg said:
On Wed, 17 Nov 2004 08:38:34 -0400, hermie wrote:

Hi Jeff

I can see the combobox but not its contents

Here are the steps I did.
1. create unbound form with combo box
2. set combobox row source properties (select
esctarea.IDstudent,esctarea.estudiante FROM esctarea;)
3. named combo box 'cbofind'
4 set bound column to 1 and column width to 0",1"
5 add an command button with click property me.visible = false
6 saved form as ParamForm

In this fase when I open the form I see the combobox and commandbutton but
the combox not have data

Next step
In the query (esctarea) i put in field IDstduent forms!ParamForm!cbofind

In the reports on open event I put: DoCmd.Openform "ParaForm", , , , ,
acDialog
In the reports on close event I put: DoCmd.Close acForm, "ParaForm"

When I open now the report the form ParamForm opens and cannot selct nothing
in the combobox???

Hope my steps are clear to you

Herman

** snipped **

Hermie,

1) Did you also set the Column Count property to 2

2) Is esctarea the name of the table that the fields IDstudent and
estudiante are in?

Change the combo box Row Source to (all on one line):

select esctarea.IDstudent,esctarea.estudiante FROM esctarea Where
esctarea.IDstudent = forms!ParamForm!cbofind;

After you write the above directly on the combo box RowSource line
click on the button with the 3 dots that appears on that line.
Run the query that appears.
You should get prompted for the ID?
After entering a valid ID do you get the correct records returned?
If so, your rowsourse is OK. If not you have improperly written the
SQL, or you have no records to display for that ID.
You'll have to 'fix' it.

Hermie,

The Rowsource data for the combo box should come from the Student
table, not from the Esctarea query.
The Students table was a hidden object.

Here is the rowsource for the [cbofind] combo box:

SELECT Students.IDstudent, [Nombre] & " " & [apellidop] & " " &
[apellidom] AS FullName FROM Students ORDER BY [Nombre] & " " &
[apellidop] & " " & [apellidom];

I kept the student name in the same order you had them in the report.
You can change the order of the names if you wish, for example:
[apellidop] & ", " [Nombre] & " " & [apellidom] AS FullName
(It would be easier to search by family name rather than first name,
but that choice is yours.)
If you do, also change the Order By to reflect the new name
arrangement.

Set the Bound Column property to 1.
Set the Column Count property to 2.
Set Column Widths to 0";1.5" (to show the names in full.)
Set the LimitToList peoperty to Yes.

Run the report. The report opens the ParamForm.
Select the student from the combo box.
Click the command button.
The report displays the selected students data.

If you still have difficulty let me know and I'll email you back your
working database, otherwise I'll delete it in a few days.

Good luck.
 
Fred
One additional question
Why does the combobox not work with a query? Now I have students in the list
which are not active.

Herman
fredg said:
Hi fred

I changed the column count to 2 but have no effect
Esctarea is a query does this matter?

Here is the SQL view of the query

SELECT Students.IDstudent, [nombre] & " " & [apellidop] & " " & [apellidom]
AS estudiante, [tareas estudiantes].ss, Students.Grupo, Students.Nombre,
Students.ApellidoP, Students.ApellidoM, Students.activo, [tareas
estudiantes].fecha, [tareas estudiantes].esptarea, [tareas
estudiantes].puntos, [tareas estudiantes].valor, ([puntos]/[valor]) AS
[Percent], caltareas([Percent]) AS [Nota test]
FROM Students INNER JOIN [tareas estudiantes] ON (Students.ss = [tareas
estudiantes].ss) AND (Students.ss = [tareas estudiantes].ss)
WHERE (((Students.IDstudent)=[forms]![paramform]![cbofind]) AND
((Students.activo)=True))
ORDER BY [nombre] & " " & [apellidop] & " " & [apellidom], Students.Grupo;

I changed the rowsource with yours but not have effect too?

I made an testdatabase with only the items related If you want i can send a
copy is small

Herman

On Wed, 17 Nov 2004 08:38:34 -0400, hermie wrote:

Hi Jeff

I can see the combobox but not its contents

Here are the steps I did.
1. create unbound form with combo box
2. set combobox row source properties (select
esctarea.IDstudent,esctarea.estudiante FROM esctarea;)
3. named combo box 'cbofind'
4 set bound column to 1 and column width to 0",1"
5 add an command button with click property me.visible = false
6 saved form as ParamForm

In this fase when I open the form I see the combobox and commandbutton
but
the combox not have data

Next step
In the query (esctarea) i put in field IDstduent
forms!ParamForm!cbofind

In the reports on open event I put: DoCmd.Openform "ParaForm", , , , ,
acDialog
In the reports on close event I put: DoCmd.Close acForm, "ParaForm"

When I open now the report the form ParamForm opens and cannot selct
nothing
in the combobox???

Hope my steps are clear to you

Herman

** snipped **

Hermie,

1) Did you also set the Column Count property to 2

2) Is esctarea the name of the table that the fields IDstudent and
estudiante are in?

Change the combo box Row Source to (all on one line):

select esctarea.IDstudent,esctarea.estudiante FROM esctarea Where
esctarea.IDstudent = forms!ParamForm!cbofind;

After you write the above directly on the combo box RowSource line
click on the button with the 3 dots that appears on that line.
Run the query that appears.
You should get prompted for the ID?
After entering a valid ID do you get the correct records returned?
If so, your rowsourse is OK. If not you have improperly written the
SQL, or you have no records to display for that ID.
You'll have to 'fix' it.

Hermie,

The Rowsource data for the combo box should come from the Student
table, not from the Esctarea query.
The Students table was a hidden object.

Here is the rowsource for the [cbofind] combo box:

SELECT Students.IDstudent, [Nombre] & " " & [apellidop] & " " &
[apellidom] AS FullName FROM Students ORDER BY [Nombre] & " " &
[apellidop] & " " & [apellidom];

I kept the student name in the same order you had them in the report.
You can change the order of the names if you wish, for example:
[apellidop] & ", " [Nombre] & " " & [apellidom] AS FullName
(It would be easier to search by family name rather than first name,
but that choice is yours.)
If you do, also change the Order By to reflect the new name
arrangement.

Set the Bound Column property to 1.
Set the Column Count property to 2.
Set Column Widths to 0";1.5" (to show the names in full.)
Set the LimitToList peoperty to Yes.

Run the report. The report opens the ParamForm.
Select the student from the combo box.
Click the command button.
The report displays the selected students data.

If you still have difficulty let me know and I'll email you back your
working database, otherwise I'll delete it in a few days.

Good luck.

You have to tell it that in the combo box row source.

SELECT Students.IDstudent, [Nombre] & " " & [apellidop] & " " &
[apellidom] AS FullName, Students.activo
FROM Students
WHERE (((Students.activo)=True))
ORDER BY [Nombre] & " " & [apellidop] & " " & [apellidom];
 
Back
Top