Adding "ALL" into Combo Box

G

Guest

I have a combo Box in my forms. This form his used to Generate a report. When
I select each one of the customer in the combo box with a date I do not have
any problem. I have the word "ALL" in my combo box using ( SELECT DISTINCT
store.client FROM store UNION select "All Customer" from store; ) when I use
All i`m unable to have a result in my report. Can anyone help me on this one
please ???
 
R

ruralguy via AccessMonster.com

Without more detail I would guess that you need to eliminate the
WhereCondition from your OpenReport command when the user selects "All
Customers".
 
M

Marshall Barton

GlobalTek said:
I have a combo Box in my forms. This form his used to Generate a report. When
I select each one of the customer in the combo box with a date I do not have
any problem. I have the word "ALL" in my combo box using ( SELECT DISTINCT
store.client FROM store UNION select "All Customer" from store; ) when I use
All i`m unable to have a result in my report.

Please explain how you are opening the report.

Please post a Copy/Paste of the the report's record source
query.

If the report is opened via a command button on the form,
also Copy/Paste the command button's Click event procedure.
 
G

Guest

Here is a copy of the Click event

Private Sub cmdReport_Click()
On Error GoTo Err_cmdReport_Click

Dim stdocname As String

stdocname = "Mtl Loads"

'Check values are entered into Date From and Date To text boxes and customer
combobox
'if so run report or cancel request

If Len(Me.txtdatefrom & vbNullString) = 0 Or Len(Me.txtDateTo &
vbNullString) = 0 Or Len(Me.cboSearch & vbNullString) = 0 Then
MsgBox "Please select a customer and input date range to proceed", _
vbInformation, "Information Required ..."
Exit Sub
Else
DoCmd.OpenReport stdocname, acPreview
End If
Exit_cmdReport_Click:
Exit Sub

Err_cmdReport_Click:
MsgBox Err.Description
Resume Exit_cmdReport_Click

End Sub

Here is the row source

SELECT DISTINCT store.client FROM store UNION select "All Customer" from
store;
 
T

tina

Here is the row source
SELECT DISTINCT store.client FROM store UNION select "All Customer" from
store;

that's the RowSource of the combobox control on the form, hon. Marshall
asked to see "the *report's* record source query."

hth
 
V

Van T. Dinh

Please post the SQL String / SQL String of the Query being used as the
RecordSource for the Report.

Marsh asked for the RecordSource of the Report because it is likely that you
filter the records for the Report in the RecordSource.
 
G

Guest

I`m not using any Sql String. The Combo box take the information from a table
called store. I have a query that filter the information and the command his
: [Forms]![frmReports]![cboSearch] the only one that desn't work his ALL and
I`m not that good with Access so sometime I may look stupid when you ask info
and I do not give you the correct answer
 
J

Josh

They want the Record Source of the Report.

Open the Report "Mtl Loads" in design view, and look to see what the
Record Source of the Report itself is.......

HTH

I`m not using any Sql String. The Combo box take the information from a table
called store. I have a query that filter the information and the command his
: [Forms]![frmReports]![cboSearch] the only one that desn't work his ALL and
I`m not that good with Access so sometime I may look stupid when you ask info
and I do not give you the correct answer

Van T. Dinh said:
Please post the SQL String / SQL String of the Query being used as the
RecordSource for the Report.

Marsh asked for the RecordSource of the Report because it is likely that you
filter the records for the Report in the RecordSource.
 
M

Marshall Barton

Right! And if it's an SQL statement, Copy Paste it in your
reply. If it's the name of a query, find the query in the
database window and Copy/Paste its SQL view.
--
Marsh
MVP [MS Access]

They want the Record Source of the Report.

Open the Report "Mtl Loads" in design view, and look to see what the
Record Source of the Report itself is.......

HTH

I`m not using any Sql String. The Combo box take the information from a table
called store. I have a query that filter the information and the command his
: [Forms]![frmReports]![cboSearch] the only one that desn't work his ALL and
I`m not that good with Access so sometime I may look stupid when you ask info
and I do not give you the correct answer

Van T. Dinh said:
Please post the SQL String / SQL String of the Query being used as the
RecordSource for the Report.

Marsh asked for the RecordSource of the Report because it is likely that you
filter the records for the Report in the RecordSource.

--
HTH
Van T. Dinh
MVP (Access)



Here is a copy of the Click event

Private Sub cmdReport_Click()
On Error GoTo Err_cmdReport_Click

Dim stdocname As String

stdocname = "Mtl Loads"

'Check values are entered into Date From and Date To text boxes and
customer
combobox
'if so run report or cancel request

If Len(Me.txtdatefrom & vbNullString) = 0 Or Len(Me.txtDateTo &
vbNullString) = 0 Or Len(Me.cboSearch & vbNullString) = 0 Then
MsgBox "Please select a customer and input date range to proceed",
_
vbInformation, "Information Required ..."
Exit Sub
Else
DoCmd.OpenReport stdocname, acPreview
End If
Exit_cmdReport_Click:
Exit Sub

Err_cmdReport_Click:
MsgBox Err.Description
Resume Exit_cmdReport_Click

End Sub

Here is the row source

SELECT DISTINCT store.client FROM store UNION select "All Customer" from
store;
 
G

Guest

I think It will be easier to do it a different way. I have a form that
contain 1 Combo Box. The combo box takes the info from a table. I would like
to be able to create ( ALL Store ) and when I select this option it will
select everything include in the table and generate the report.

How can I built this code ???

Marshall Barton said:
Right! And if it's an SQL statement, Copy Paste it in your
reply. If it's the name of a query, find the query in the
database window and Copy/Paste its SQL view.
--
Marsh
MVP [MS Access]

They want the Record Source of the Report.

Open the Report "Mtl Loads" in design view, and look to see what the
Record Source of the Report itself is.......

HTH

I`m not using any Sql String. The Combo box take the information from a table
called store. I have a query that filter the information and the command his
: [Forms]![frmReports]![cboSearch] the only one that desn't work his ALL and
I`m not that good with Access so sometime I may look stupid when you ask info
and I do not give you the correct answer

:

Please post the SQL String / SQL String of the Query being used as the
RecordSource for the Report.

Marsh asked for the RecordSource of the Report because it is likely that you
filter the records for the Report in the RecordSource.

--
HTH
Van T. Dinh
MVP (Access)



Here is a copy of the Click event

Private Sub cmdReport_Click()
On Error GoTo Err_cmdReport_Click

Dim stdocname As String

stdocname = "Mtl Loads"

'Check values are entered into Date From and Date To text boxes and
customer
combobox
'if so run report or cancel request

If Len(Me.txtdatefrom & vbNullString) = 0 Or Len(Me.txtDateTo &
vbNullString) = 0 Or Len(Me.cboSearch & vbNullString) = 0 Then
MsgBox "Please select a customer and input date range to proceed",
_
vbInformation, "Information Required ..."
Exit Sub
Else
DoCmd.OpenReport stdocname, acPreview
End If
Exit_cmdReport_Click:
Exit Sub

Err_cmdReport_Click:
MsgBox Err.Description
Resume Exit_cmdReport_Click

End Sub

Here is the row source

SELECT DISTINCT store.client FROM store UNION select "All Customer" from
store;
 
G

Guest

Figure another solution, Here is a link to download my database.
http://globalteknet.com/download/ Can you check it out and tell me I can I
make the word ALL CUSTOMER work when It is selected in the form

thanks

GlobalTek said:
I think It will be easier to do it a different way. I have a form that
contain 1 Combo Box. The combo box takes the info from a table. I would like
to be able to create ( ALL Store ) and when I select this option it will
select everything include in the table and generate the report.

How can I built this code ???

Marshall Barton said:
Right! And if it's an SQL statement, Copy Paste it in your
reply. If it's the name of a query, find the query in the
database window and Copy/Paste its SQL view.
--
Marsh
MVP [MS Access]

They want the Record Source of the Report.

Open the Report "Mtl Loads" in design view, and look to see what the
Record Source of the Report itself is.......

HTH

On Mon, 6 Nov 2006 10:18:01 -0800, GlobalTek

I`m not using any Sql String. The Combo box take the information from a table
called store. I have a query that filter the information and the command his
: [Forms]![frmReports]![cboSearch] the only one that desn't work his ALL and
I`m not that good with Access so sometime I may look stupid when you ask info
and I do not give you the correct answer

:

Please post the SQL String / SQL String of the Query being used as the
RecordSource for the Report.

Marsh asked for the RecordSource of the Report because it is likely that you
filter the records for the Report in the RecordSource.

--
HTH
Van T. Dinh
MVP (Access)



Here is a copy of the Click event

Private Sub cmdReport_Click()
On Error GoTo Err_cmdReport_Click

Dim stdocname As String

stdocname = "Mtl Loads"

'Check values are entered into Date From and Date To text boxes and
customer
combobox
'if so run report or cancel request

If Len(Me.txtdatefrom & vbNullString) = 0 Or Len(Me.txtDateTo &
vbNullString) = 0 Or Len(Me.cboSearch & vbNullString) = 0 Then
MsgBox "Please select a customer and input date range to proceed",
_
vbInformation, "Information Required ..."
Exit Sub
Else
DoCmd.OpenReport stdocname, acPreview
End If
Exit_cmdReport_Click:
Exit Sub

Err_cmdReport_Click:
MsgBox Err.Description
Resume Exit_cmdReport_Click

End Sub

Here is the row source

SELECT DISTINCT store.client FROM store UNION select "All Customer" from
store;
 
M

Marshall Barton

No, that won't work and it wouldn't be easier if it did.
Please just post the query's SQL view so we can unravel what
you have and show you how to make it work. If you are
having trouble posting the query's SQL view, explain what
the trouble is and we'll try to get that straightened out
too.
--
Marsh
MVP [MS Access]

I think It will be easier to do it a different way. I have a form that
contain 1 Combo Box. The combo box takes the info from a table. I would like
to be able to create ( ALL Store ) and when I select this option it will
select everything include in the table and generate the report.

How can I built this code ???

Marshall Barton said:
Right! And if it's an SQL statement, Copy Paste it in your
reply. If it's the name of a query, find the query in the
database window and Copy/Paste its SQL view.

They want the Record Source of the Report.

Open the Report "Mtl Loads" in design view, and look to see what the
Record Source of the Report itself is.......


On Mon, 6 Nov 2006 10:18:01 -0800, GlobalTek wrote:

I`m not using any Sql String. The Combo box take the information from a table
called store. I have a query that filter the information and the command his
: [Forms]![frmReports]![cboSearch] the only one that desn't work his ALL and
I`m not that good with Access so sometime I may look stupid when you ask info
and I do not give you the correct answer

:

Please post the SQL String / SQL String of the Query being used as the
RecordSource for the Report.

Marsh asked for the RecordSource of the Report because it is likely that you
filter the records for the Report in the RecordSource.


Here is a copy of the Click event

Private Sub cmdReport_Click()
On Error GoTo Err_cmdReport_Click

Dim stdocname As String

stdocname = "Mtl Loads"

'Check values are entered into Date From and Date To text boxes and
customer
combobox
'if so run report or cancel request

If Len(Me.txtdatefrom & vbNullString) = 0 Or Len(Me.txtDateTo &
vbNullString) = 0 Or Len(Me.cboSearch & vbNullString) = 0 Then
MsgBox "Please select a customer and input date range to proceed",
_
vbInformation, "Information Required ..."
Exit Sub
Else
DoCmd.OpenReport stdocname, acPreview
End If
Exit_cmdReport_Click:
Exit Sub

Err_cmdReport_Click:
MsgBox Err.Description
Resume Exit_cmdReport_Click

End Sub

Here is the row source

SELECT DISTINCT store.client FROM store UNION select "All Customer" from
store;
 
G

Guest

I have open the "MTL Loads" in design view and I see each field the name they
have and then Data Type they are all at Text.. No SQL, No indexed no
validation or lookup his set.



Marshall Barton said:
No, that won't work and it wouldn't be easier if it did.
Please just post the query's SQL view so we can unravel what
you have and show you how to make it work. If you are
having trouble posting the query's SQL view, explain what
the trouble is and we'll try to get that straightened out
too.
--
Marsh
MVP [MS Access]

I think It will be easier to do it a different way. I have a form that
contain 1 Combo Box. The combo box takes the info from a table. I would like
to be able to create ( ALL Store ) and when I select this option it will
select everything include in the table and generate the report.

How can I built this code ???

Marshall Barton said:
Right! And if it's an SQL statement, Copy Paste it in your
reply. If it's the name of a query, find the query in the
database window and Copy/Paste its SQL view.


Josh wrote:

They want the Record Source of the Report.

Open the Report "Mtl Loads" in design view, and look to see what the
Record Source of the Report itself is.......


On Mon, 6 Nov 2006 10:18:01 -0800, GlobalTek wrote:

I`m not using any Sql String. The Combo box take the information from a table
called store. I have a query that filter the information and the command his
: [Forms]![frmReports]![cboSearch] the only one that desn't work his ALL and
I`m not that good with Access so sometime I may look stupid when you ask info
and I do not give you the correct answer

:

Please post the SQL String / SQL String of the Query being used as the
RecordSource for the Report.

Marsh asked for the RecordSource of the Report because it is likely that you
filter the records for the Report in the RecordSource.


Here is a copy of the Click event

Private Sub cmdReport_Click()
On Error GoTo Err_cmdReport_Click

Dim stdocname As String

stdocname = "Mtl Loads"

'Check values are entered into Date From and Date To text boxes and
customer
combobox
'if so run report or cancel request

If Len(Me.txtdatefrom & vbNullString) = 0 Or Len(Me.txtDateTo &
vbNullString) = 0 Or Len(Me.cboSearch & vbNullString) = 0 Then
MsgBox "Please select a customer and input date range to proceed",
_
vbInformation, "Information Required ..."
Exit Sub
Else
DoCmd.OpenReport stdocname, acPreview
End If
Exit_cmdReport_Click:
Exit Sub

Err_cmdReport_Click:
MsgBox Err.Description
Resume Exit_cmdReport_Click

End Sub

Here is the row source

SELECT DISTINCT store.client FROM store UNION select "All Customer" from
store;
 
M

Marshall Barton

I thought MTL Loads was the name of your report??? Reports
do not contain any fields. Reports only contain controls
that can be used to display values (possibly of fields in
the report's Recordf Source).

I am asking about the report's Record Source that is
specified in the report's Record Source property. Open the
report in design view, then display the report's property
sheet. Look at the Record Source property and if it is an
SQL statement Copy/Paste it. If it is the name of a query,
go to the Database window, select the Queries tab, select
the query and clcik on the Design button. Then use the View
menu to display the query's SQL View and Copy/Paste the SQL
statement.
--
Marsh
MVP [MS Access]

I have open the "MTL Loads" in design view and I see each field the name they
have and then Data Type they are all at Text.. No SQL, No indexed no
validation or lookup his set.


Marshall Barton said:
No, that won't work and it wouldn't be easier if it did.
Please just post the query's SQL view so we can unravel what
you have and show you how to make it work. If you are
having trouble posting the query's SQL view, explain what
the trouble is and we'll try to get that straightened out
too.

I think It will be easier to do it a different way. I have a form that
contain 1 Combo Box. The combo box takes the info from a table. I would like
to be able to create ( ALL Store ) and when I select this option it will
select everything include in the table and generate the report.

How can I built this code ???

:
Right! And if it's an SQL statement, Copy Paste it in your
reply. If it's the name of a query, find the query in the
database window and Copy/Paste its SQL view.


Josh wrote:
They want the Record Source of the Report.

Open the Report "Mtl Loads" in design view, and look to see what the
Record Source of the Report itself is.......


On Mon, 6 Nov 2006 10:18:01 -0800, GlobalTek wrote:

I`m not using any Sql String. The Combo box take the information from a table
called store. I have a query that filter the information and the command his
: [Forms]![frmReports]![cboSearch] the only one that desn't work his ALL and
I`m not that good with Access so sometime I may look stupid when you ask info
and I do not give you the correct answer

:
Please post the SQL String / SQL String of the Query being used as the
RecordSource for the Report.

Marsh asked for the RecordSource of the Report because it is likely that you
filter the records for the Report in the RecordSource.


Here is a copy of the Click event

Private Sub cmdReport_Click()
On Error GoTo Err_cmdReport_Click

Dim stdocname As String

stdocname = "Mtl Loads"

'Check values are entered into Date From and Date To text boxes and
customer
combobox
'if so run report or cancel request

If Len(Me.txtdatefrom & vbNullString) = 0 Or Len(Me.txtDateTo &
vbNullString) = 0 Or Len(Me.cboSearch & vbNullString) = 0 Then
MsgBox "Please select a customer and input date range to proceed",
_
vbInformation, "Information Required ..."
Exit Sub
Else
DoCmd.OpenReport stdocname, acPreview
End If
Exit_cmdReport_Click:
Exit Sub

Err_cmdReport_Click:
MsgBox Err.Description
Resume Exit_cmdReport_Click

End Sub

Here is the row source

SELECT DISTINCT store.client FROM store UNION select "All Customer" from
store;
 
R

ruralguy via AccessMonster.com

Marsh,

Here's the RecordSource for the [Mtl Loads] report in the db he posted.

-----------------------------------------------

SELECT [Mtl Loads].Date, [Mtl Loads].Customer, [Mtl Loads].[Remorque #1],
[Mtl Loads].[Emplacement #1], [Mtl Loads].[Remorque #2], [Mtl Loads].
[Emplacement #2], [Mtl Loads].[Remorque #3], [Mtl Loads].[Emplacement #3],
[Mtl Loads].[Remorque #4], [Mtl Loads].[Emplacement #4]
FROM [Mtl Loads]
WHERE ((([Mtl Loads].Date)>=[forms]![frmReports]![txtDateFrom] And ([Mtl
Loads].Date)<=[forms]![frmReports]![txtDateTo]) AND (([Mtl Loads].Customer)=
[Forms]![frmReports]![cboSearch]))
ORDER BY [Mtl Loads].Date, [Mtl Loads].Customer;

------------------------------------------------

Marshall said:
I thought MTL Loads was the name of your report??? Reports
do not contain any fields. Reports only contain controls
that can be used to display values (possibly of fields in
the report's Recordf Source).

I am asking about the report's Record Source that is
specified in the report's Record Source property. Open the
report in design view, then display the report's property
sheet. Look at the Record Source property and if it is an
SQL statement Copy/Paste it. If it is the name of a query,
go to the Database window, select the Queries tab, select
the query and clcik on the Design button. Then use the View
menu to display the query's SQL View and Copy/Paste the SQL
statement.
I have open the "MTL Loads" in design view and I see each field the name they
have and then Data Type they are all at Text.. No SQL, No indexed no
[quoted text clipped - 71 lines]
 
M

Marshall Barton

You're a braver person than I to download and execute a
program from an unknown source. Even though I recommend
against doing that, thanks for getting this thread out of an
apparent dead end.
--
Marsh
MVP [MS Access]

Marsh,

Here's the RecordSource for the [Mtl Loads] report in the db he posted.

-----------------------------------------------

SELECT [Mtl Loads].Date, [Mtl Loads].Customer, [Mtl Loads].[Remorque #1],
[Mtl Loads].[Emplacement #1], [Mtl Loads].[Remorque #2], [Mtl Loads].
[Emplacement #2], [Mtl Loads].[Remorque #3], [Mtl Loads].[Emplacement #3],
[Mtl Loads].[Remorque #4], [Mtl Loads].[Emplacement #4]
FROM [Mtl Loads]
WHERE ((([Mtl Loads].Date)>=[forms]![frmReports]![txtDateFrom] And ([Mtl
Loads].Date)<=[forms]![frmReports]![txtDateTo]) AND (([Mtl Loads].Customer)=
[Forms]![frmReports]![cboSearch]))
ORDER BY [Mtl Loads].Date, [Mtl Loads].Customer;

------------------------------------------------

Marshall said:
I thought MTL Loads was the name of your report??? Reports
do not contain any fields. Reports only contain controls
that can be used to display values (possibly of fields in
the report's Recordf Source).

I am asking about the report's Record Source that is
specified in the report's Record Source property. Open the
report in design view, then display the report's property
sheet. Look at the Record Source property and if it is an
SQL statement Copy/Paste it. If it is the name of a query,
go to the Database window, select the Queries tab, select
the query and clcik on the Design button. Then use the View
menu to display the query's SQL View and Copy/Paste the SQL
statement.
I have open the "MTL Loads" in design view and I see each field the name they
have and then Data Type they are all at Text.. No SQL, No indexed no
[quoted text clipped - 71 lines]
SELECT DISTINCT store.client FROM store UNION select "All Customer" from
store;
 
M

Marshall Barton

Marshall said:
I thought MTL Loads was the name of your report??? Reports
do not contain any fields. Reports only contain controls
that can be used to display values (possibly of fields in
the report's Recordf Source).

I am asking about the report's Record Source that is
specified in the report's Record Source property. Open the
report in design view, then display the report's property
sheet. Look at the Record Source property and if it is an
SQL statement Copy/Paste it. If it is the name of a query,
go to the Database window, select the Queries tab, select
the query and clcik on the Design button. Then use the View
menu to display the query's SQL View and Copy/Paste the SQL
statement.

Now that ruralguy has posted the query for you, we will try
to proceed.

There are two ways to deal with your problem. Although I
normally recommend using the approach the ruralguy
suggested, based on how this thread has progressed, maybe
you should try using this relativey simple modification to
your report's Record Source query:

SELECT [Mtl Loads].Date, [Mtl Loads].Customer,
[Mtl Loads].[Remorque #1], [Mtl Loads].[Emplacement #1],
[Mtl Loads].[Remorque #2], [Mtl Loads].[Emplacement #2],
[Mtl Loads].[Remorque #3], [Mtl Loads].[Emplacement #3],
[Mtl Loads].[Remorque #4], [Mtl Loads].[Emplacement #4]
FROM [Mtl Loads]
WHERE ([Mtl Loads].Date >=
[Forms]![frmReports]![txtDateFrom]
And [Mtl Loads].Date <=
[Forms]![frmReports]![txtDateTo])
AND ([Mtl Loads].Customer =
[Forms]![frmReports]![cboSearch]
OR [Forms]![frmReports]![cboSearch] =
"All Customer")
ORDER BY [Mtl Loads].Date, [Mtl Loads].Customer
 
G

Guest

Mr. Marshall Barton,

Sorry If I have been a pain in the A*s, I really do appreciated the time you
took for me and Yes it is working now. Again Thank you Sir .

Marshall Barton said:
Marshall said:
I thought MTL Loads was the name of your report??? Reports
do not contain any fields. Reports only contain controls
that can be used to display values (possibly of fields in
the report's Recordf Source).

I am asking about the report's Record Source that is
specified in the report's Record Source property. Open the
report in design view, then display the report's property
sheet. Look at the Record Source property and if it is an
SQL statement Copy/Paste it. If it is the name of a query,
go to the Database window, select the Queries tab, select
the query and clcik on the Design button. Then use the View
menu to display the query's SQL View and Copy/Paste the SQL
statement.

Now that ruralguy has posted the query for you, we will try
to proceed.

There are two ways to deal with your problem. Although I
normally recommend using the approach the ruralguy
suggested, based on how this thread has progressed, maybe
you should try using this relativey simple modification to
your report's Record Source query:

SELECT [Mtl Loads].Date, [Mtl Loads].Customer,
[Mtl Loads].[Remorque #1], [Mtl Loads].[Emplacement #1],
[Mtl Loads].[Remorque #2], [Mtl Loads].[Emplacement #2],
[Mtl Loads].[Remorque #3], [Mtl Loads].[Emplacement #3],
[Mtl Loads].[Remorque #4], [Mtl Loads].[Emplacement #4]
FROM [Mtl Loads]
WHERE ([Mtl Loads].Date >=
[Forms]![frmReports]![txtDateFrom]
And [Mtl Loads].Date <=
[Forms]![frmReports]![txtDateTo])
AND ([Mtl Loads].Customer =
[Forms]![frmReports]![cboSearch]
OR [Forms]![frmReports]![cboSearch] =
"All Customer")
ORDER BY [Mtl Loads].Date, [Mtl Loads].Customer
 
M

Marshall Barton

You're welcome. I'm glad to hear it's all taken care of
now.
--
Marsh
MVP [MS Access]

Mr. Marshall Barton,

Sorry If I have been a pain in the A*s, I really do appreciated the time you
took for me and Yes it is working now. Again Thank you Sir .

Marshall Barton said:
Marshall said:
I thought MTL Loads was the name of your report??? Reports
do not contain any fields. Reports only contain controls
that can be used to display values (possibly of fields in
the report's Recordf Source).

I am asking about the report's Record Source that is
specified in the report's Record Source property. Open the
report in design view, then display the report's property
sheet. Look at the Record Source property and if it is an
SQL statement Copy/Paste it. If it is the name of a query,
go to the Database window, select the Queries tab, select
the query and clcik on the Design button. Then use the View
menu to display the query's SQL View and Copy/Paste the SQL
statement.

Now that ruralguy has posted the query for you, we will try
to proceed.

There are two ways to deal with your problem. Although I
normally recommend using the approach the ruralguy
suggested, based on how this thread has progressed, maybe
you should try using this relativey simple modification to
your report's Record Source query:

SELECT [Mtl Loads].Date, [Mtl Loads].Customer,
[Mtl Loads].[Remorque #1], [Mtl Loads].[Emplacement #1],
[Mtl Loads].[Remorque #2], [Mtl Loads].[Emplacement #2],
[Mtl Loads].[Remorque #3], [Mtl Loads].[Emplacement #3],
[Mtl Loads].[Remorque #4], [Mtl Loads].[Emplacement #4]
FROM [Mtl Loads]
WHERE ([Mtl Loads].Date >=
[Forms]![frmReports]![txtDateFrom]
And [Mtl Loads].Date <=
[Forms]![frmReports]![txtDateTo])
AND ([Mtl Loads].Customer =
[Forms]![frmReports]![cboSearch]
OR [Forms]![frmReports]![cboSearch] =
"All Customer")
ORDER BY [Mtl Loads].Date, [Mtl Loads].Customer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

select all 13
combo box not updated 2
Combo Box help 0
cascading combo help 3
"Add all" from Combo Box to Table 3
Combo Box & Report Questions 22
Enter Parmeter Dialog Box 1
combo box wizard 1

Top