HEEEELP!! Less Hair then B4!

G

Guest

I have a number of check boxes in a query, I would like to dynamically alter
which check box will be displayed by using a combo box in a form. I am having
a mare with this one everything I have tried doesn't seem to be working heres
what I have for each check box in Criteria:

(SELECT[Fieldname]FROM[Tablename]WHERE[Tablename].[Fieldname] =
[Forms]![Formname]![Comboboxname])
OR
(SELECT[Fieldname]FROM[Tablename]WHERE[Tablename].[Fieldname] <>
[Forms]![Formname]![Comboboxname])
OR
(SELECT[Fieldname]FROM[Tablename]WHERE[Tablename].[Fieldname] NOT
[Forms]![Formname]![Comboboxname])

I have 11 check boxes, maybe thats too many for Mr. Microsoft or I'm just
useless. Pleeease Help.
Cheers
 
K

Ken Snell [MVP]

Your post does not contain enough information about what you're doing. For
what is the SQL statement that you posted (it doesn't look correct for a
query) being used? Is the checkbox to be made visible on a form?

Please, start at the beginning and give us full details about your setup,
what you're selecting/doing on the form, what you're wanting to occur, etc.
 
S

SusanV

Hi Ashley,

I think this might be a simpler way to get what you're looking for - instead
of using straight SQL I'd use a Select Case statement to trigger which
checkbox is visible, and hide the rest. You could hide them all on the forms
load event then make them visible using the combobox's on update event,
something like this:

dim c as string
c = me.combobox.text

SELECT Case c
Case "Yes"
me.checkbox1.visible = true
Case "No"
me.checkbox2.visible = true
Case "Maybe"
me.checkbox3.visible = true
End SELECT
 
G

Guest

Ok. Here's wot I would love to happen. I have a list of job numbers that may
apply to 11 types of vehicle. I have a table of these job numbers with the
vehicle checked yes/no if the number applies to that vehicle.
In a form I would like the user to be able to select one vehicle type and
have a report/query to tell them what job numbers apply to that specific
vehicle only!!
I have tried entering the expressions posted into the criteria for each
vehicle, as im not greatly firmiliar with SQL.
Cheers guys your help is much appreciated.
--
Regards

Ashley Smart


Ken Snell said:
Your post does not contain enough information about what you're doing. For
what is the SQL statement that you posted (it doesn't look correct for a
query) being used? Is the checkbox to be made visible on a form?

Please, start at the beginning and give us full details about your setup,
what you're selecting/doing on the form, what you're wanting to occur, etc.

--

Ken Snell
<MS ACCESS MVP>


A. Smart said:
I have a number of check boxes in a query, I would like to dynamically
alter
which check box will be displayed by using a combo box in a form. I am
having
a mare with this one everything I have tried doesn't seem to be working
heres
what I have for each check box in Criteria:

(SELECT[Fieldname]FROM[Tablename]WHERE[Tablename].[Fieldname] =
[Forms]![Formname]![Comboboxname])
OR
(SELECT[Fieldname]FROM[Tablename]WHERE[Tablename].[Fieldname] <>
[Forms]![Formname]![Comboboxname])
OR
(SELECT[Fieldname]FROM[Tablename]WHERE[Tablename].[Fieldname] NOT
[Forms]![Formname]![Comboboxname])

I have 11 check boxes, maybe thats too many for Mr. Microsoft or I'm just
useless. Pleeease Help.
Cheers
 
K

Ken Snell [MVP]

To help you specifically, please post the table structures that you're
using.. include field names and indicate which fields are related to others.
Include some sample data for what might be in the table, and how you want
the query to return records based on the sample data.

I'm thinking that your issue is resulting from a less-than-ideal table
design, and perhaps we can modify the setup and make things easier.

--

Ken Snell
<MS ACCESS MVP>


A. Smart said:
Ok. Here's wot I would love to happen. I have a list of job numbers that
may
apply to 11 types of vehicle. I have a table of these job numbers with the
vehicle checked yes/no if the number applies to that vehicle.
In a form I would like the user to be able to select one vehicle type and
have a report/query to tell them what job numbers apply to that specific
vehicle only!!
I have tried entering the expressions posted into the criteria for each
vehicle, as im not greatly firmiliar with SQL.
Cheers guys your help is much appreciated.
--
Regards

Ashley Smart


Ken Snell said:
Your post does not contain enough information about what you're doing.
For
what is the SQL statement that you posted (it doesn't look correct for a
query) being used? Is the checkbox to be made visible on a form?

Please, start at the beginning and give us full details about your setup,
what you're selecting/doing on the form, what you're wanting to occur,
etc.

--

Ken Snell
<MS ACCESS MVP>


A. Smart said:
I have a number of check boxes in a query, I would like to dynamically
alter
which check box will be displayed by using a combo box in a form. I am
having
a mare with this one everything I have tried doesn't seem to be working
heres
what I have for each check box in Criteria:

(SELECT[Fieldname]FROM[Tablename]WHERE[Tablename].[Fieldname] =
[Forms]![Formname]![Comboboxname])
OR
(SELECT[Fieldname]FROM[Tablename]WHERE[Tablename].[Fieldname] <>
[Forms]![Formname]![Comboboxname])
OR
(SELECT[Fieldname]FROM[Tablename]WHERE[Tablename].[Fieldname] NOT
[Forms]![Formname]![Comboboxname])

I have 11 check boxes, maybe thats too many for Mr. Microsoft or I'm
just
useless. Pleeease Help.
Cheers
 

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