search form

G

Guest

Hi,

I have created a form (MainForm) that does not have any recordsource. There
is a subform in it that displays the records in a query. On the main form
there are several text boxes and combo boxes that I can use to enter criteria
to search for specific records to display in the main form. The form design
was downloaded from:
http://www.access-programmers.co.uk/forums/archive/index.php/t-99353.html.
For some reason when I adapted this design to my form, it doesn't work
properly. Specifically, when I press the search button, nothing happens - no
searching, no error messages. And I can't figure out why!!!!!! Here is a
sample of my code:

1. I set the record source property of the subform to the Function BuildFilter
Private Sub btnSearch_Click()
' Update the record source
Me.FRM_Find SubForm.Form.RecordSource = "SELECT * FROM QRY_Find WHERE "
& BuildFilter
' Requery the subform
Me.FRM_Find SubForm.Requery
End Sub

2. I create build filter
Private Function BuildFilter() As Variant
Dim varWhere As Variant
Dim intIndex As Integer
Dim lngLen As Long
Const conJetDate = "\#mm\/dd\/yy\#"

varWhere = Null ' Main filter
' Check for Assay Type
If Not IsNull(Me.cboAssay) Then
varWhere = varWhere & "[Assay] = " & Me.cboAssay & " AND "
End If
etc..... for all the boxes, then
' Check if there is a filter to return...
If IsNull(varWhere) Then
varWhere = ""
Else
lngLen = Len(varWhere) - 5
If lngLen <= 0 Then
MsgBox "No Criteria", vbInformation, "Nothing to do."
Else
varWhere = Left$(varWhere, lngLen)
End If
End If
BuildFilter = varWhere
End Function

What am I missing?!??!?!?! Its driving me nuts! Any help is appreciated
 
G

Guest

Hi Gen,

The first thing I would do is to verify that btnSearch has an [Event
Procedure] or the name of a function specified in it's Click event property,
found on the Events tab of the Properties dialog. If so, then add a break
point at the beginning of the code. When you click on the command button, you
should see the code suspend at the break point. You can then execute one line
at a time, using the F8 key, or use the F5 key to execute many lines of code
(either to the next break point that you set, or to the end of the procedure).

Note: In order for break points to be observed, you must have the option
"Use Access Special Keys" checked off. This option is found under Tools |
Startup. If you find that it was deselected, you must close the database and
re-open it in order for this option to take affect.

I haven't downloaded the code, but does it include any On Error Resume Next
statements? If so, you could be silently blowing through an error, without
knowing it.

Also, is there any chance that you are using Access 2000? The reason I ask
is that I have experienced many times where click event procedures just plain
don't work, when the database was previously compiled in A2002 or A2003. If
that is the case, try the following set of instructions:

First, make a back-up copy of your database, if you have not already done
so. Try opening your database using the undocumented /decompile option. If
you only have one version of Access installed, you can click on Start | Run,
and enter: msaccess /decompile

The next database that you open will have it's compiled VBA code discarded.
If you have more than one version of Access installed, then create a shortcut
whose target points to the full path of msaccess.exe with this optional
switch included. For example: "C:\Program Files\Microsoft Office
2003\OFFICE11\MSACCESS.EXE" /decompile

Open the suspect database while holding down the Shift key the entire time,
to prevent any startup code from running. After opening the database, do a
compact and repair, again holding down the Shift key. Then open any code
module and compile your VBA code. If this does not fix your database,
continue on with the next paragraphs.

Create a brand new database and immediately disable the NameAutocorrect
feature (see: http://allenbrowne.com/bug-03.html for reasons why you want to
do this). Then import all objects from the suspect database into the new
database, one group at a time. In other words, import all tables (but not
linked tables), then import all queries, then all forms, etc. When importing
tables, it is a good idea to click on the Options >> button and check the
options to import relationships (unless you suspect corruption in a
relationship), along with Menu/Toolbars and Import/Export Specs. While Access
will allow you to import all objects in one operation, the experts at FMS,
Inc. (a Microsoft Partner), have stated that it is best to import objects one
group at a time (Reference:
http://www.fmsinc.com/ubb/Forum12/HTML/000285.html).

Recreate any linked tables from scratch using File | Get External Data |
Link tables...
Access can cache a lot of information about linked tables, which may no
longer be valid, so it's always best to recreate the linked tables from
scratch. When importing local tables, make sure to check the option to import
relationships, menus and toolbars, and import/export specs. If any of the
local tables in the source DB are hidden, you'll need to first unhide them.
You will need to set the checked references to match the source database,
along with any startup options set under Tools > Startup. Going through this
process often times solves corruption problems, because you get a new set of
the hidden system tables (the tables whose names start with "MSYS"). These
system tables are updated appropriately as you import objects.

This may sound like a lot of work, but it really isn't. Creating a new
container DB, disabling NameAutocorrect, importing all objects one group at a
time, re-establishing any linked tables, setting startup options, and setting
references to match the source DB is usually a fairly quick procedure. When
you are in the Visual Basic Editor, in order to check that the references
match the source DB, you should do a Debug > Compile ProjectName as well.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Gen said:
Hi,

I have created a form (MainForm) that does not have any recordsource. There
is a subform in it that displays the records in a query. On the main form
there are several text boxes and combo boxes that I can use to enter criteria
to search for specific records to display in the main form. The form design
was downloaded from:
http://www.access-programmers.co.uk/forums/archive/index.php/t-99353.html.
For some reason when I adapted this design to my form, it doesn't work
properly. Specifically, when I press the search button, nothing happens - no
searching, no error messages. And I can't figure out why!!!!!! Here is a
sample of my code:

1. I set the record source property of the subform to the Function BuildFilter
Private Sub btnSearch_Click()
' Update the record source
Me.FRM_Find SubForm.Form.RecordSource = "SELECT * FROM QRY_Find WHERE "
& BuildFilter
' Requery the subform
Me.FRM_Find SubForm.Requery
End Sub

2. I create build filter
Private Function BuildFilter() As Variant
Dim varWhere As Variant
Dim intIndex As Integer
Dim lngLen As Long
Const conJetDate = "\#mm\/dd\/yy\#"

varWhere = Null ' Main filter
' Check for Assay Type
If Not IsNull(Me.cboAssay) Then
varWhere = varWhere & "[Assay] = " & Me.cboAssay & " AND "
End If
etc..... for all the boxes, then
' Check if there is a filter to return...
If IsNull(varWhere) Then
varWhere = ""
Else
lngLen = Len(varWhere) - 5
If lngLen <= 0 Then
MsgBox "No Criteria", vbInformation, "Nothing to do."
Else
varWhere = Left$(varWhere, lngLen)
End If
End If
BuildFilter = varWhere
End Function

What am I missing?!??!?!?! Its driving me nuts! Any help is appreciated
 
G

Guest

Wow do i feel like an idoit! I didn't change the on Event procedure from the
Macro that I had before, duh.

So now it runs my code, the problem is that I keep getting an error message:

Syntax error (missing operator) in query expression '([Assay]=ELISPOT)'

That is when i enter ELISPOT into the appropriate box in my form. Looking
back at the website where I got the code, this seems to be a common problem.
The only solution posted did not work for me, and the discussion is closed.
The solution posted was to change where the "WHERE " statement was added. Any
suggestions on this one?

Tom Wickerath said:
Hi Gen,

The first thing I would do is to verify that btnSearch has an [Event
Procedure] or the name of a function specified in it's Click event property,
found on the Events tab of the Properties dialog. If so, then add a break
point at the beginning of the code. When you click on the command button, you
should see the code suspend at the break point. You can then execute one line
at a time, using the F8 key, or use the F5 key to execute many lines of code
(either to the next break point that you set, or to the end of the procedure).

Note: In order for break points to be observed, you must have the option
"Use Access Special Keys" checked off. This option is found under Tools |
Startup. If you find that it was deselected, you must close the database and
re-open it in order for this option to take affect.

I haven't downloaded the code, but does it include any On Error Resume Next
statements? If so, you could be silently blowing through an error, without
knowing it.

Also, is there any chance that you are using Access 2000? The reason I ask
is that I have experienced many times where click event procedures just plain
don't work, when the database was previously compiled in A2002 or A2003. If
that is the case, try the following set of instructions:

First, make a back-up copy of your database, if you have not already done
so. Try opening your database using the undocumented /decompile option. If
you only have one version of Access installed, you can click on Start | Run,
and enter: msaccess /decompile

The next database that you open will have it's compiled VBA code discarded.
If you have more than one version of Access installed, then create a shortcut
whose target points to the full path of msaccess.exe with this optional
switch included. For example: "C:\Program Files\Microsoft Office
2003\OFFICE11\MSACCESS.EXE" /decompile

Open the suspect database while holding down the Shift key the entire time,
to prevent any startup code from running. After opening the database, do a
compact and repair, again holding down the Shift key. Then open any code
module and compile your VBA code. If this does not fix your database,
continue on with the next paragraphs.

Create a brand new database and immediately disable the NameAutocorrect
feature (see: http://allenbrowne.com/bug-03.html for reasons why you want to
do this). Then import all objects from the suspect database into the new
database, one group at a time. In other words, import all tables (but not
linked tables), then import all queries, then all forms, etc. When importing
tables, it is a good idea to click on the Options >> button and check the
options to import relationships (unless you suspect corruption in a
relationship), along with Menu/Toolbars and Import/Export Specs. While Access
will allow you to import all objects in one operation, the experts at FMS,
Inc. (a Microsoft Partner), have stated that it is best to import objects one
group at a time (Reference:
http://www.fmsinc.com/ubb/Forum12/HTML/000285.html).

Recreate any linked tables from scratch using File | Get External Data |
Link tables...
Access can cache a lot of information about linked tables, which may no
longer be valid, so it's always best to recreate the linked tables from
scratch. When importing local tables, make sure to check the option to import
relationships, menus and toolbars, and import/export specs. If any of the
local tables in the source DB are hidden, you'll need to first unhide them.
You will need to set the checked references to match the source database,
along with any startup options set under Tools > Startup. Going through this
process often times solves corruption problems, because you get a new set of
the hidden system tables (the tables whose names start with "MSYS"). These
system tables are updated appropriately as you import objects.

This may sound like a lot of work, but it really isn't. Creating a new
container DB, disabling NameAutocorrect, importing all objects one group at a
time, re-establishing any linked tables, setting startup options, and setting
references to match the source DB is usually a fairly quick procedure. When
you are in the Visual Basic Editor, in order to check that the references
match the source DB, you should do a Debug > Compile ProjectName as well.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Gen said:
Hi,

I have created a form (MainForm) that does not have any recordsource. There
is a subform in it that displays the records in a query. On the main form
there are several text boxes and combo boxes that I can use to enter criteria
to search for specific records to display in the main form. The form design
was downloaded from:
http://www.access-programmers.co.uk/forums/archive/index.php/t-99353.html.
For some reason when I adapted this design to my form, it doesn't work
properly. Specifically, when I press the search button, nothing happens - no
searching, no error messages. And I can't figure out why!!!!!! Here is a
sample of my code:

1. I set the record source property of the subform to the Function BuildFilter
Private Sub btnSearch_Click()
' Update the record source
Me.FRM_Find SubForm.Form.RecordSource = "SELECT * FROM QRY_Find WHERE "
& BuildFilter
' Requery the subform
Me.FRM_Find SubForm.Requery
End Sub

2. I create build filter
Private Function BuildFilter() As Variant
Dim varWhere As Variant
Dim intIndex As Integer
Dim lngLen As Long
Const conJetDate = "\#mm\/dd\/yy\#"

varWhere = Null ' Main filter
' Check for Assay Type
If Not IsNull(Me.cboAssay) Then
varWhere = varWhere & "[Assay] = " & Me.cboAssay & " AND "
End If
etc..... for all the boxes, then
' Check if there is a filter to return...
If IsNull(varWhere) Then
varWhere = ""
Else
lngLen = Len(varWhere) - 5
If lngLen <= 0 Then
MsgBox "No Criteria", vbInformation, "Nothing to do."
Else
varWhere = Left$(varWhere, lngLen)
End If
End If
BuildFilter = varWhere
End Function

What am I missing?!??!?!?! Its driving me nuts! Any help is appreciated
 
P

Pieter Wijnen

You need to enquote the string
you can also change the AND bit like so:
varWhere = (varWhere + " AND ") & "[Assay] = '" & Me.cboAssay.Value & "'"

HtH

Pieter

Gen said:
Wow do i feel like an idoit! I didn't change the on Event procedure from
the
Macro that I had before, duh.

So now it runs my code, the problem is that I keep getting an error
message:

Syntax error (missing operator) in query expression '([Assay]=ELISPOT)'

That is when i enter ELISPOT into the appropriate box in my form. Looking
back at the website where I got the code, this seems to be a common
problem.
The only solution posted did not work for me, and the discussion is
closed.
The solution posted was to change where the "WHERE " statement was added.
Any
suggestions on this one?

Tom Wickerath said:
Hi Gen,

The first thing I would do is to verify that btnSearch has an [Event
Procedure] or the name of a function specified in it's Click event
property,
found on the Events tab of the Properties dialog. If so, then add a break
point at the beginning of the code. When you click on the command button,
you
should see the code suspend at the break point. You can then execute one
line
at a time, using the F8 key, or use the F5 key to execute many lines of
code
(either to the next break point that you set, or to the end of the
procedure).

Note: In order for break points to be observed, you must have the option
"Use Access Special Keys" checked off. This option is found under Tools |
Startup. If you find that it was deselected, you must close the database
and
re-open it in order for this option to take affect.

I haven't downloaded the code, but does it include any On Error Resume
Next
statements? If so, you could be silently blowing through an error,
without
knowing it.

Also, is there any chance that you are using Access 2000? The reason I
ask
is that I have experienced many times where click event procedures just
plain
don't work, when the database was previously compiled in A2002 or A2003.
If
that is the case, try the following set of instructions:

First, make a back-up copy of your database, if you have not already done
so. Try opening your database using the undocumented /decompile option.
If
you only have one version of Access installed, you can click on Start |
Run,
and enter: msaccess /decompile

The next database that you open will have it's compiled VBA code
discarded.
If you have more than one version of Access installed, then create a
shortcut
whose target points to the full path of msaccess.exe with this optional
switch included. For example: "C:\Program Files\Microsoft Office
2003\OFFICE11\MSACCESS.EXE" /decompile

Open the suspect database while holding down the Shift key the entire
time,
to prevent any startup code from running. After opening the database, do
a
compact and repair, again holding down the Shift key. Then open any code
module and compile your VBA code. If this does not fix your database,
continue on with the next paragraphs.

Create a brand new database and immediately disable the NameAutocorrect
feature (see: http://allenbrowne.com/bug-03.html for reasons why you want
to
do this). Then import all objects from the suspect database into the new
database, one group at a time. In other words, import all tables (but not
linked tables), then import all queries, then all forms, etc. When
importing
tables, it is a good idea to click on the Options >> button and check the
options to import relationships (unless you suspect corruption in a
relationship), along with Menu/Toolbars and Import/Export Specs. While
Access
will allow you to import all objects in one operation, the experts at
FMS,
Inc. (a Microsoft Partner), have stated that it is best to import objects
one
group at a time (Reference:
http://www.fmsinc.com/ubb/Forum12/HTML/000285.html).

Recreate any linked tables from scratch using File | Get External Data |
Link tables...
Access can cache a lot of information about linked tables, which may no
longer be valid, so it's always best to recreate the linked tables from
scratch. When importing local tables, make sure to check the option to
import
relationships, menus and toolbars, and import/export specs. If any of the
local tables in the source DB are hidden, you'll need to first unhide
them.
You will need to set the checked references to match the source database,
along with any startup options set under Tools > Startup. Going through
this
process often times solves corruption problems, because you get a new set
of
the hidden system tables (the tables whose names start with "MSYS").
These
system tables are updated appropriately as you import objects.

This may sound like a lot of work, but it really isn't. Creating a new
container DB, disabling NameAutocorrect, importing all objects one group
at a
time, re-establishing any linked tables, setting startup options, and
setting
references to match the source DB is usually a fairly quick procedure.
When
you are in the Visual Basic Editor, in order to check that the references
match the source DB, you should do a Debug > Compile ProjectName as well.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Gen said:
Hi,

I have created a form (MainForm) that does not have any recordsource.
There
is a subform in it that displays the records in a query. On the main
form
there are several text boxes and combo boxes that I can use to enter
criteria
to search for specific records to display in the main form. The form
design
was downloaded from:
http://www.access-programmers.co.uk/forums/archive/index.php/t-99353.html.
For some reason when I adapted this design to my form, it doesn't work
properly. Specifically, when I press the search button, nothing
happens - no
searching, no error messages. And I can't figure out why!!!!!! Here is
a
sample of my code:

1. I set the record source property of the subform to the Function
BuildFilter
Private Sub btnSearch_Click()
' Update the record source
Me.FRM_Find SubForm.Form.RecordSource = "SELECT * FROM QRY_Find
WHERE "
& BuildFilter
' Requery the subform
Me.FRM_Find SubForm.Requery
End Sub

2. I create build filter
Private Function BuildFilter() As Variant
Dim varWhere As Variant
Dim intIndex As Integer
Dim lngLen As Long
Const conJetDate = "\#mm\/dd\/yy\#"

varWhere = Null ' Main filter
' Check for Assay Type
If Not IsNull(Me.cboAssay) Then
varWhere = varWhere & "[Assay] = " & Me.cboAssay & " AND "
End If
etc..... for all the boxes, then
' Check if there is a filter to return...
If IsNull(varWhere) Then
varWhere = ""
Else
lngLen = Len(varWhere) - 5
If lngLen <= 0 Then
MsgBox "No Criteria", vbInformation, "Nothing to do."
Else
varWhere = Left$(varWhere, lngLen)
End If
End If
BuildFilter = varWhere
End Function

What am I missing?!??!?!?! Its driving me nuts! Any help is appreciated
 
G

Guest

Hi Gen,

Pieter's suggestion should work for you as long as the data in
cboAssay.Value does not include any apostrophes. Otherwise, you can
substitute Chr(32) if this is a problem. Here are some other examples for you
to take a look at, which you can download from my personal web page. The
first and fourth examples, "customdialogbox.zip" and
"SelfAdjustingCrosstabExample.zip" are more along the lines of forms used to
supply parameters to queries, but you may find them useful nonetheless:

QBF Examples
http://home.comcast.net/~tutorme2/samples/customdialogbox.zip
http://home.comcast.net/~tutorme2/samples/elements.zip --->
Multiselect list box example with chemical elements
http://home.comcast.net/~tutorme2/samples/Chap08QBF.zip

Crosstab Example
http://home.comcast.net/~tutorme2/samples/SelfAdjustingCrosstabExample.zip


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
G

Gen

OK its working!! Thanks so much for your help. Just so you know, the
elements.zip link does not work.

This is what I ended up doing:

1. Define variables:
Dim strWhere As String
Dim StrFullSQL As String
2. Build up the SQL statement into strWhere from multiple combo and text
boxes, using the following exmaple code:

'To get variable from combo box
If Me.cboAssay > "" Then
strWhere = strWhere & "([Assay] = """ & Me.cboAssay & """) AND "
End If
'To get variable from text box
If Me.txtOther > "" Then
strWhere = strWhere & "([Other] LIKE ""*" & Me.txtOther & "*"") AND "
End If

3. Check that criteria was entered and send to the RecordSource for the
subform:

If IsNull(strWhere) Then
Else
' strip off last "AND" in the filter
If Right(strWhere, 5) = " AND " Then
strWhere = Left(strWhere, Len(strWhere) - 5)
strWhere = "WHERE " & strWhere
End If
End If

' Set new SQL string to the recordsource
StrFullSQL = "SELECT * FROM QRY_Find " & strWhere
Me.FRM_Find_subform.Form.RecordSource = StrFullSQL
Me.FRM_Find_subform.Form.Requery

I hope this can help anyone else who may be pulling their hair out trying to
make it work!

Tom Wickerath said:
Hi Gen,

Pieter's suggestion should work for you as long as the data in
cboAssay.Value does not include any apostrophes. Otherwise, you can
substitute Chr(32) if this is a problem. Here are some other examples for you
to take a look at, which you can download from my personal web page. The
first and fourth examples, "customdialogbox.zip" and
"SelfAdjustingCrosstabExample.zip" are more along the lines of forms used to
supply parameters to queries, but you may find them useful nonetheless:

QBF Examples
http://home.comcast.net/~tutorme2/samples/customdialogbox.zip
http://home.comcast.net/~tutorme2/samples/elements.zip --->
Multiselect list box example with chemical elements
http://home.comcast.net/~tutorme2/samples/Chap08QBF.zip

Crosstab Example
http://home.comcast.net/~tutorme2/samples/SelfAdjustingCrosstabExample.zip


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Gen said:
Wow do i feel like an idoit! I didn't change the on Event procedure from the
Macro that I had before, duh.

So now it runs my code, the problem is that I keep getting an error message:

Syntax error (missing operator) in query expression '([Assay]=ELISPOT)'

That is when i enter ELISPOT into the appropriate box in my form. Looking
back at the website where I got the code, this seems to be a common problem.
The only solution posted did not work for me, and the discussion is closed.
The solution posted was to change where the "WHERE " statement was added. Any
suggestions on this one?
 
T

Tom Wickerath

Hi Gen,
OK its working!! Thanks so much for your help. Just so you know, the
elements.zip link does not work.

I'm glad someone is checking! Not sure what happened there. I think there
might be a white space included with the URL in the last message. Try this
link (hopefully it will work):

http://home.comcast.net/~tutorme2/samples/elements.zip


Unless you absolutely need the leading wildcard here:
strWhere = strWhere & "([Other] LIKE ""*" & Me.txtOther & "*"") AND "

I would consider only adding the trailing wildcard. This can be an issue for
multiuser Access applications, where a network separates your computer from
the data. Assuming the [Other] field is indexed, as it likely should be since
you are using it as the criteria for a query, JET will be able to pull just
the selected records from the BE (back-end) database, but only if you are not
using a leading wildcard. The leading wildcard will force a table scan (ie.
all records in the table are transferred over the network wire). For more
information on this, see my MultiUser Applications paper:

Implementing a Successful Multiuser Access/JET Application
http://www.access.qbuilt.com/html/multiuser_applications.html

with particular attention to the sections titled "Use indexes" and "Use
JETSHOWPLAN".


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Gen said:
OK its working!! Thanks so much for your help. Just so you know, the
elements.zip link does not work.

This is what I ended up doing:

1. Define variables:
Dim strWhere As String
Dim StrFullSQL As String
2. Build up the SQL statement into strWhere from multiple combo and text
boxes, using the following exmaple code:

'To get variable from combo box
If Me.cboAssay > "" Then
strWhere = strWhere & "([Assay] = """ & Me.cboAssay & """) AND "
End If
'To get variable from text box
If Me.txtOther > "" Then
strWhere = strWhere & "([Other] LIKE ""*" & Me.txtOther & "*"") AND "
End If

3. Check that criteria was entered and send to the RecordSource for the
subform:

If IsNull(strWhere) Then
Else
' strip off last "AND" in the filter
If Right(strWhere, 5) = " AND " Then
strWhere = Left(strWhere, Len(strWhere) - 5)
strWhere = "WHERE " & strWhere
End If
End If

' Set new SQL string to the recordsource
StrFullSQL = "SELECT * FROM QRY_Find " & strWhere
Me.FRM_Find_subform.Form.RecordSource = StrFullSQL
Me.FRM_Find_subform.Form.Requery

I hope this can help anyone else who may be pulling their hair out trying to
make it work!

Tom Wickerath said:
Hi Gen,

Pieter's suggestion should work for you as long as the data in
cboAssay.Value does not include any apostrophes. Otherwise, you can
substitute Chr(32) if this is a problem. Here are some other examples for you
to take a look at, which you can download from my personal web page. The
first and fourth examples, "customdialogbox.zip" and
"SelfAdjustingCrosstabExample.zip" are more along the lines of forms used to
supply parameters to queries, but you may find them useful nonetheless:

QBF Examples
http://home.comcast.net/~tutorme2/samples/customdialogbox.zip
http://home.comcast.net/~tutorme2/samples/elements.zip --->
Multiselect list box example with chemical elements
http://home.comcast.net/~tutorme2/samples/Chap08QBF.zip

Crosstab Example
http://home.comcast.net/~tutorme2/samples/SelfAdjustingCrosstabExample.zip


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Gen said:
Wow do i feel like an idoit! I didn't change the on Event procedure from the
Macro that I had before, duh.

So now it runs my code, the problem is that I keep getting an error message:

Syntax error (missing operator) in query expression '([Assay]=ELISPOT)'

That is when i enter ELISPOT into the appropriate box in my form. Looking
back at the website where I got the code, this seems to be a common problem.
The only solution posted did not work for me, and the discussion is closed.
The solution posted was to change where the "WHERE " statement was added. Any
suggestions on this one?
 

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