Parameter query with multiple check boxes

D

Duane Hookom

Where did you place your code? It should be in the On Click event of the
command button that opens your report. Can you copy your complete "sub" in a
reply?
--
Duane Hookom
MS Access MVP


Aviator said:
I deleted that line, still receiver error in the VB, "Compile Error:Invalid
Outside Procedure" It then highlights the "" in the third line of the
code.

Duane Hookom said:
I am having trouble reading your error message. Did you attempt to
compile
your code? I kinda expect you might have an issue that can't be seen here
due to line wrapping. Try delete the line(s):
' [Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting]
or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner]
or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]

--
Duane Hookom
MS Access MVP

Aviator said:
I receive error when running the report. It signals line 3 at the "".
What
do
I put here? Name of the report? Name of the Form?

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
End If
'the final strWhere might look like
' [Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting]
or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner]
or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere
 
A

Aviator

I entered the code in the "On Click" event area of the form on the "OK"
Button that I created. I copied the entire VB code for that form to this
reply, it wasent entered correctly before. I no longer get an error message.
On the form, I select my aircraft type from the drop down box, and select one
or more check boxes, then select OK and one dialog box apprears asking me to
"Enter Parameter Value". If I leave it blank the report appears with no
results, if I put any value in it returns every record in the database. If I
don't select any check boxes and only select a aircraft type, no dialog box
appears but still every record is returned. In that senerio I would want all
record for that aircraft only. That tells me it is requesting a check box
parameter but not sure from where or why. I feel I we are getting closer,
that is hopeful.

Private Sub OK_Click()

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
End If
'the final strWhere might look like
' [Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting] or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner] or
[Seat Belts] or [Seats] or
or [Telephone] or [Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

End Sub

Private Sub Close_Click()
DoCmd.Close 'Close Form
End Sub


Duane Hookom said:
Where did you place your code? It should be in the On Click event of the
command button that opens your report. Can you copy your complete "sub" in a
reply?
--
Duane Hookom
MS Access MVP


Aviator said:
I deleted that line, still receiver error in the VB, "Compile Error:Invalid
Outside Procedure" It then highlights the "" in the third line of the
code.

Duane Hookom said:
I am having trouble reading your error message. Did you attempt to
compile
your code? I kinda expect you might have an issue that can't be seen here
due to line wrapping. Try delete the line(s):
' [Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting]
or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner]
or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]

--
Duane Hookom
MS Access MVP

I receive error when running the report. It signals line 3 at the "".
What
do
I put here? Name of the report? Name of the Form?

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
End If
'the final strWhere might look like
' [Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting]
or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner]
or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere
 
D

Duane Hookom

Do you know what your strWhere looks like just prior to opening the report?
Try modify the code
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
debug.print "strWhere: " & strWhere
End If

Then, after running the report, open your code window and view the immediate
window to see the value in strWhere. If you can't figure out an error, paste
the strWhere value in a reply.
--
Duane Hookom
MS Access MVP


Aviator said:
I entered the code in the "On Click" event area of the form on the "OK"
Button that I created. I copied the entire VB code for that form to this
reply, it wasent entered correctly before. I no longer get an error
message.
On the form, I select my aircraft type from the drop down box, and select
one
or more check boxes, then select OK and one dialog box apprears asking me
to
"Enter Parameter Value". If I leave it blank the report appears with no
results, if I put any value in it returns every record in the database. If
I
don't select any check boxes and only select a aircraft type, no dialog
box
appears but still every record is returned. In that senerio I would want
all
record for that aircraft only. That tells me it is requesting a check box
parameter but not sure from where or why. I feel I we are getting closer,
that is hopeful.

Private Sub OK_Click()

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
End If
'the final strWhere might look like
' [Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting] or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner] or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

End Sub

Private Sub Close_Click()
DoCmd.Close 'Close Form
End Sub


Duane Hookom said:
Where did you place your code? It should be in the On Click event of the
command button that opens your report. Can you copy your complete "sub"
in a
reply?
--
Duane Hookom
MS Access MVP


Aviator said:
I deleted that line, still receiver error in the VB, "Compile
Error:Invalid
Outside Procedure" It then highlights the "" in the third line of the
code.

:

I am having trouble reading your error message. Did you attempt to
compile
your code? I kinda expect you might have an issue that can't be seen
here
due to line wrapping. Try delete the line(s):
' [Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job]
or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or
[Lighting]
or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or
[Runner]
or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]

--
Duane Hookom
MS Access MVP

I receive error when running the report. It signals line 3 at the "".
What
do
I put here? Name of the report? Name of the Form?

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
End If
'the final strWhere might look like
' [Airstairs/Entrance] or [Carpet] or [Cockpit Items] or
[Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job]
or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or
[Lighting]
or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or
[Runner]
or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, ,
strWhere
 
A

Aviator

Unfamiliar with the "strWhere" so I paste the code here. I ran the report
using the form. The code is written withing the button "ok" on the form that
has the 25 check boxes. If I select one or more check boxes and click OK, a
dialog box appears "Enter Parameter Value". If any value other than "0" is
entered, all records are returned. If zero is entered, there are no returns.
If I click cancel, DeBug runs and highlights the line

DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

Making the change that you last sent had no visible effect.

Private Sub OK_Click()

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
Debug.Print "strWhere: " & strWhere
End If

'the final strWhere might look like
'[Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting] or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner] or
[Seat Belts] or [Seats] or
or [Telephone] or [Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

End Sub

Private Sub Close_Click()
DoCmd.Close 'Close Form
End Sub
 
D

Duane Hookom

I would not expect any "visible effect".
Press Ctrl+G to open the immediate window and look for your strWhere value
after attempting to run the report.

Does your form with the command button contain 25 check boxes? Did you edit
the Tag property of each check box to contain the name of the appropriate
field?

Does your error message provide any more information than "Enter Parameter
Value"?
 
A

Aviator

That worked, I did not have the tag prpertys filled in. Now I return results
like I want for the Work items, (Check boxes). But it does not limit it to
the aircraft type list box. I have the Tag property box filled in for that. I
no longer recieve the dialog box. The immediate window displays:

strWhere: [Airstairs/Entrance] or [Carpet]

Depending on the check boxes selected like it should, so that works. Just
need to solve the aircraft type, combo box problem.

You have been a great help thusfar. I have to leave for the day, and will be
unavailable most of tomorrow. I would like to continue with this on Monday if
your are able.

Thanks again! I feel we are on the home streach.

Jason
(e-mail address removed)

Duane Hookom said:
I would not expect any "visible effect".
Press Ctrl+G to open the immediate window and look for your strWhere value
after attempting to run the report.

Does your form with the command button contain 25 check boxes? Did you edit
the Tag property of each check box to contain the name of the appropriate
field?

Does your error message provide any more information than "Enter Parameter
Value"?

--
Duane Hookom
MS Access MVP


Aviator said:
Unfamiliar with the "strWhere" so I paste the code here. I ran the report
using the form. The code is written withing the button "ok" on the form
that
has the 25 check boxes. If I select one or more check boxes and click OK,
a
dialog box appears "Enter Parameter Value". If any value other than "0" is
entered, all records are returned. If zero is entered, there are no
returns.
If I click cancel, DeBug runs and highlights the line

DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

Making the change that you last sent had no visible effect.

Private Sub OK_Click()

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
Debug.Print "strWhere: " & strWhere
End If

'the final strWhere might look like
'[Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting] or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner] or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

End Sub

Private Sub Close_Click()
DoCmd.Close 'Close Form
End Sub
 
D

Duane Hookom

You need to provide the name of the aircraft type criteria control on your
form, the name of the field in your report, and the data type of the field.
--
Duane Hookom
MS Access MVP


Aviator said:
That worked, I did not have the tag prpertys filled in. Now I return
results
like I want for the Work items, (Check boxes). But it does not limit it to
the aircraft type list box. I have the Tag property box filled in for
that. I
no longer recieve the dialog box. The immediate window displays:

strWhere: [Airstairs/Entrance] or [Carpet]

Depending on the check boxes selected like it should, so that works. Just
need to solve the aircraft type, combo box problem.

You have been a great help thusfar. I have to leave for the day, and will
be
unavailable most of tomorrow. I would like to continue with this on Monday
if
your are able.

Thanks again! I feel we are on the home streach.

Jason
(e-mail address removed)

Duane Hookom said:
I would not expect any "visible effect".
Press Ctrl+G to open the immediate window and look for your strWhere
value
after attempting to run the report.

Does your form with the command button contain 25 check boxes? Did you
edit
the Tag property of each check box to contain the name of the appropriate
field?

Does your error message provide any more information than "Enter
Parameter
Value"?

--
Duane Hookom
MS Access MVP


Aviator said:
Unfamiliar with the "strWhere" so I paste the code here. I ran the
report
using the form. The code is written withing the button "ok" on the form
that
has the 25 check boxes. If I select one or more check boxes and click
OK,
a
dialog box appears "Enter Parameter Value". If any value other than "0"
is
entered, all records are returned. If zero is entered, there are no
returns.
If I click cancel, DeBug runs and highlights the line

DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

Making the change that you last sent had no visible effect.

Private Sub OK_Click()

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
Debug.Print "strWhere: " & strWhere
End If

'the final strWhere might look like
'[Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting]
or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner]
or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

End Sub

Private Sub Close_Click()
DoCmd.Close 'Close Form
End Sub
 
A

Aviator

I searched thru my form and report. I am not following what you are saying I
need to do.

Duane Hookom said:
You need to provide the name of the aircraft type criteria control on your
form, the name of the field in your report, and the data type of the field.
--
Duane Hookom
MS Access MVP


Aviator said:
That worked, I did not have the tag prpertys filled in. Now I return
results
like I want for the Work items, (Check boxes). But it does not limit it to
the aircraft type list box. I have the Tag property box filled in for
that. I
no longer recieve the dialog box. The immediate window displays:

strWhere: [Airstairs/Entrance] or [Carpet]

Depending on the check boxes selected like it should, so that works. Just
need to solve the aircraft type, combo box problem.

You have been a great help thusfar. I have to leave for the day, and will
be
unavailable most of tomorrow. I would like to continue with this on Monday
if
your are able.

Thanks again! I feel we are on the home streach.

Jason
(e-mail address removed)

Duane Hookom said:
I would not expect any "visible effect".
Press Ctrl+G to open the immediate window and look for your strWhere
value
after attempting to run the report.

Does your form with the command button contain 25 check boxes? Did you
edit
the Tag property of each check box to contain the name of the appropriate
field?

Does your error message provide any more information than "Enter
Parameter
Value"?

--
Duane Hookom
MS Access MVP


Unfamiliar with the "strWhere" so I paste the code here. I ran the
report
using the form. The code is written withing the button "ok" on the form
that
has the 25 check boxes. If I select one or more check boxes and click
OK,
a
dialog box appears "Enter Parameter Value". If any value other than "0"
is
entered, all records are returned. If zero is entered, there are no
returns.
If I click cancel, DeBug runs and highlights the line

DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

Making the change that you last sent had no visible effect.

Private Sub OK_Click()

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
Debug.Print "strWhere: " & strWhere
End If

'the final strWhere might look like
'[Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job] or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or [Lighting]
or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or [Runner]
or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

End Sub

Private Sub Close_Click()
DoCmd.Close 'Close Form
End Sub
 
D

Duane Hookom

You stated earlier "aircraft type list box" but didn't give us the name of
this list box. You also haven't provided the actual name of the aircraft
type field in your report's record source. We also don't know if this field
is text or numeric.

--
Duane Hookom
MS Access MVP

Aviator said:
I searched thru my form and report. I am not following what you are saying
I
need to do.

Duane Hookom said:
You need to provide the name of the aircraft type criteria control on
your
form, the name of the field in your report, and the data type of the
field.
--
Duane Hookom
MS Access MVP


Aviator said:
That worked, I did not have the tag prpertys filled in. Now I return
results
like I want for the Work items, (Check boxes). But it does not limit it
to
the aircraft type list box. I have the Tag property box filled in for
that. I
no longer recieve the dialog box. The immediate window displays:

strWhere: [Airstairs/Entrance] or [Carpet]

Depending on the check boxes selected like it should, so that works.
Just
need to solve the aircraft type, combo box problem.

You have been a great help thusfar. I have to leave for the day, and
will
be
unavailable most of tomorrow. I would like to continue with this on
Monday
if
your are able.

Thanks again! I feel we are on the home streach.

Jason
(e-mail address removed)

:

I would not expect any "visible effect".
Press Ctrl+G to open the immediate window and look for your strWhere
value
after attempting to run the report.

Does your form with the command button contain 25 check boxes? Did you
edit
the Tag property of each check box to contain the name of the
appropriate
field?

Does your error message provide any more information than "Enter
Parameter
Value"?

--
Duane Hookom
MS Access MVP


Unfamiliar with the "strWhere" so I paste the code here. I ran the
report
using the form. The code is written withing the button "ok" on the
form
that
has the 25 check boxes. If I select one or more check boxes and
click
OK,
a
dialog box appears "Enter Parameter Value". If any value other than
"0"
is
entered, all records are returned. If zero is entered, there are no
returns.
If I click cancel, DeBug runs and highlights the line

DoCmd.OpenReport "Type and Work Report", acViewPreview, , strWhere

Making the change that you last sent had no visible effect.

Private Sub OK_Click()

Dim strWhere As String
Dim ctl As Control
strWhere = "" 'initialize the where clause
For Each ctl In Me.Controls 'loop through all controls on form
'find the check boxes
If ctl.ControlType = acCheckBox Then
'find the true check boxes
If ctl.Value = True Then
'add to the where clause
strWhere = strWhere & "[" & ctl.Tag & "] or "
End If
End If
Next
If Len(strWhere) > 1 Then
'remove the last " or " from the where clause
strWhere = Left(strWhere, Len(strWhere) - 4)
Debug.Print "strWhere: " & strWhere
End If

'the final strWhere might look like
'[Airstairs/Entrance] or [Carpet] or [Cockpit Items] or [Complete
Refurbishment] or [Cup Holders] or [Curtain] or [Divan] or [Dye Job]
or
[Entertainment] or [Galley] or [Headliner] or [Lavatory] or
[Lighting]
or
[Loncoin] or [Lower Side Walls] or [Painting] or [Repairs] or
[Runner]
or
[Seat Belts] or [Seats] or
or [Telephone] or
[Various/Miscellaneous]
or [Veneer] or [Windowline]
'open the report based on the checked boxes
DoCmd.OpenReport "Type and Work Report", acViewPreview, ,
strWhere

End Sub

Private Sub Close_Click()
DoCmd.Close 'Close Form
End Sub
 

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

Top