Option group event

K

KARL DEWEY

It asks me for the frame value, and each of those query values.
This either means you do not have the form open and an option selected
OR
You have misspelled the names somewhere along the way.

What do you get when you run this query, selecting option 1 --
SELECT [ProcessorIssue],ProcessorIssueQuery AS Option_148
FROM [ProcessorIssueTable]
WHERE [FORMS]![ReversalCostpoint]![Frame145] = 1;

What do you get when you run this query, selecting option 2 --
Select [PCOIssue], PCOIssueQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

--
KARL DEWEY
Build a little - Test a little


Pwyd said:
SELECT [ProcessorIssue],ProcessorIssueQuery AS Option_148
FROM [ProcessorIssueTable]
WHERE [FORMS]![ReversalCostpoint]![Frame145] = 1
UNION ALL Select [PCOIssue], PCOIssueQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

It asks me for the frame value, and each of those query values. am i not
referring to the queries properly?

or the frame for that matter?

Pwyd said:
Nah. both of the tables these queries are drawing from are using text
fields, with nothing else changed on them. no validation rules or anything
like that. I'm still not clear on why it keeps asking me for the parameter
values for the two i listed earlier.


Pwyd said:
It is the source, you're correct. I was confused.


Running the Query with either button clicked gives no results :(
In datasheet form, the two columns don't have any rows.



:

I think the problem is in your union query.
Here are some rules for a union query --
The datatype of each field must match between the queries - first field
DateTime, second field Number-Long Integer, third field text, etc.

In the query below PCOProcessorIssueUnionQuery will appear as Option_148 in
both outputs.
Select ProcessorIssue, PCOProcessorIssueUnionQuery AS Option_148
From [ProcessorIssueTable]
Where [FORMS]![ReversalCostpoint]![Frame145] = 1
UNION ALL Select [PCOIssue], PCOProcessorIssueUnionQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

I though PCOProcessorIssueUnionQuery was the name of this query as you said
it was the source for the combo.

Try clicking an option and running the query and seeing the results. Then
click the other option and run it.

--
KARL DEWEY
Build a little - Test a little


:

Karl i think i'm missing something. Where do the two queries that represent
the two groups of different issues get added to the combo box if i'm only
pasting their criteria into the union query?


:

for the combo box's row source i was using the union query.

PCOProcessorIssueUnionQuery


:

I also ask you to post the Row Source of the combo.

Select ProcessorIssue, PCOProcessorIssueUnionQuery AS Option_148
From [ProcessorIssueTable]
Where [FORMS]![ReversalCostpoint]![Frame145] = 1
UNION ALL Select [PCOIssue], PCOProcessorIssueUnionQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

The criteria should be 1 for first query and 2 for the second.
--
KARL DEWEY
Build a little - Test a little


:

Here's what i've got, i'm sure seeing it will help:


Select ProcessorIssue PCOProcessorIssueUnionQuery AS Option_148
From [ProcessorIssueTable]
Where [FORMS]![ReversalCostpoint]![Frame145] = Option_148
UNION ALL Select [PCOIssue] PCOProcessorIssueUnionQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = Option_150;


:

Open the form in design view and look at the proprities of the combo. Copy
the Row Source and post.
Post the SQL of your query.

--
KARL DEWEY
Build a little - Test a little


:

Karl, the option button union query works just like you said it would, except
for one thing, that is perhaps because of my naivete. The query seems to
function properly, except that when switching between the two buttons,
instead of selecting the records i have for those fields in each of those
tables, which hold the various issues for each of those two options, it
simply displays the numbers "1" and "2" in the combo box, if you flip between
each of the options selected. That leads me to believe that "1" and "2"
before the AS statement should be replaced with something, in order to
reference each of the tables. What is it? Or is my intuition incorrect?

:

Thanks Karl, i'll give it a try in the next few days, and i'll definately
come back here with any issues i come upon. You've been very helpful.
Kind Regards,
Pwyd


:

One option is for Processor issues, the other is for PCO issues.
What I posted will do that for you by way of your queries.
The option group selection number will control wich part of the union query
will pull records. That query is in turn used as source for your combo box.
--
KARL DEWEY
Build a little - Test a little


:

The combo box shows a list of issues associated with the option chosen on the
option group. One option is for Processor issues, the other is for PCO
issues. I would like the combo box to allow selection of an issue that is
related to option chosen-- i'm going to be using the option group in some
data construction, counting the number of total errors, errors caused by
processor, errors caused by PCO, and so on, and i couldn't find an easy way
to count that, without a lot more code. Also, i didn't want to make two
seperate combo boxes, when all of the issues are stored on one table, that
seems silly.

Have any other suggestions besides what i'm trying to construct here?

:

Second part -- Also, in what fashion should the option group be included in
the criteria?

SELECT Field1, Field2, Field3, 1 AS Option_One
FROM Table1
WHERE [Forms]![YourFormName]![Frame1] = Option_One
UNION ALL SELECT Field1, Field2, Field3, 2 AS Option_One
FROM Table2
WHERE [Forms]![YourFormName]![Frame1] = Option_One;

--
KARL DEWEY
Build a little - Test a little


:

I'm not familiar with union queries. Will the wizard guide me through
everything i need to use this? Also, in what fashion should the option group
be included in the criteria?

:

This is one way --
Create your queries and include the option group as criteria. Then combine
the two queries in a union query. Only the query that matches the option
selection will output records.
--
KARL DEWEY
Build a little - Test a little


:

I would like to build an option group with two options, if one option is
selected, a combo box displays one query's results, if the other option is
selected, a different query is populated into the combo box. How would i go
about doing this?
 
P

Pwyd

I just checked all the spellings, they're correct :(

The form is open, and is not in design mode. The top option is clicked.
The value in the combo box is shown as "1". If i simply run the Query, it
asks me for the value of ProcessorIssueQuery and Forms!ReversalCostpoint!
.... okay. slag that. I left out the name of the form. ReversalCostpoint is
the name of the database. [Costpoint Reversals] is the name of the form.
at any rate. it still gives me the same response. It asks me for that
first parameter, and the value of
Forms!ReversalCostpoint!Costpoint Reversals!Frame145, and PCOIssueQuery
..

After filling those values in with "1" for each, the datasheet produced
looks like this
ProcessorIssue Option_148
Processor - Duplicate Invoice

KARL DEWEY said:
This either means you do not have the form open and an option selected
OR
You have misspelled the names somewhere along the way.

What do you get when you run this query, selecting option 1 --
SELECT [ProcessorIssue],ProcessorIssueQuery AS Option_148
FROM [ProcessorIssueTable]
WHERE [FORMS]![ReversalCostpoint]![Frame145] = 1;

What do you get when you run this query, selecting option 2 --
Select [PCOIssue], PCOIssueQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

--
KARL DEWEY
Build a little - Test a little


Pwyd said:
SELECT [ProcessorIssue],ProcessorIssueQuery AS Option_148
FROM [ProcessorIssueTable]
WHERE [FORMS]![ReversalCostpoint]![Frame145] = 1
UNION ALL Select [PCOIssue], PCOIssueQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

It asks me for the frame value, and each of those query values. am i not
referring to the queries properly?

or the frame for that matter?

Pwyd said:
Nah. both of the tables these queries are drawing from are using text
fields, with nothing else changed on them. no validation rules or anything
like that. I'm still not clear on why it keeps asking me for the parameter
values for the two i listed earlier.


:


It is the source, you're correct. I was confused.


Running the Query with either button clicked gives no results :(
In datasheet form, the two columns don't have any rows.



:

I think the problem is in your union query.
Here are some rules for a union query --
The datatype of each field must match between the queries - first field
DateTime, second field Number-Long Integer, third field text, etc.

In the query below PCOProcessorIssueUnionQuery will appear as Option_148 in
both outputs.
Select ProcessorIssue, PCOProcessorIssueUnionQuery AS Option_148
From [ProcessorIssueTable]
Where [FORMS]![ReversalCostpoint]![Frame145] = 1
UNION ALL Select [PCOIssue], PCOProcessorIssueUnionQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

I though PCOProcessorIssueUnionQuery was the name of this query as you said
it was the source for the combo.

Try clicking an option and running the query and seeing the results. Then
click the other option and run it.

--
KARL DEWEY
Build a little - Test a little


:

Karl i think i'm missing something. Where do the two queries that represent
the two groups of different issues get added to the combo box if i'm only
pasting their criteria into the union query?


:

for the combo box's row source i was using the union query.

PCOProcessorIssueUnionQuery


:

I also ask you to post the Row Source of the combo.

Select ProcessorIssue, PCOProcessorIssueUnionQuery AS Option_148
From [ProcessorIssueTable]
Where [FORMS]![ReversalCostpoint]![Frame145] = 1
UNION ALL Select [PCOIssue], PCOProcessorIssueUnionQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

The criteria should be 1 for first query and 2 for the second.
--
KARL DEWEY
Build a little - Test a little


:

Here's what i've got, i'm sure seeing it will help:


Select ProcessorIssue PCOProcessorIssueUnionQuery AS Option_148
From [ProcessorIssueTable]
Where [FORMS]![ReversalCostpoint]![Frame145] = Option_148
UNION ALL Select [PCOIssue] PCOProcessorIssueUnionQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = Option_150;


:

Open the form in design view and look at the proprities of the combo. Copy
the Row Source and post.
Post the SQL of your query.

--
KARL DEWEY
Build a little - Test a little


:

Karl, the option button union query works just like you said it would, except
for one thing, that is perhaps because of my naivete. The query seems to
function properly, except that when switching between the two buttons,
instead of selecting the records i have for those fields in each of those
tables, which hold the various issues for each of those two options, it
simply displays the numbers "1" and "2" in the combo box, if you flip between
each of the options selected. That leads me to believe that "1" and "2"
before the AS statement should be replaced with something, in order to
reference each of the tables. What is it? Or is my intuition incorrect?

:

Thanks Karl, i'll give it a try in the next few days, and i'll definately
come back here with any issues i come upon. You've been very helpful.
Kind Regards,
Pwyd


:

One option is for Processor issues, the other is for PCO issues.
What I posted will do that for you by way of your queries.
The option group selection number will control wich part of the union query
will pull records. That query is in turn used as source for your combo box.
--
KARL DEWEY
Build a little - Test a little


:

The combo box shows a list of issues associated with the option chosen on the
option group. One option is for Processor issues, the other is for PCO
issues. I would like the combo box to allow selection of an issue that is
related to option chosen-- i'm going to be using the option group in some
data construction, counting the number of total errors, errors caused by
processor, errors caused by PCO, and so on, and i couldn't find an easy way
to count that, without a lot more code. Also, i didn't want to make two
seperate combo boxes, when all of the issues are stored on one table, that
seems silly.

Have any other suggestions besides what i'm trying to construct here?

:

Second part -- Also, in what fashion should the option group be included in
the criteria?

SELECT Field1, Field2, Field3, 1 AS Option_One
FROM Table1
WHERE [Forms]![YourFormName]![Frame1] = Option_One
UNION ALL SELECT Field1, Field2, Field3, 2 AS Option_One
FROM Table2
WHERE [Forms]![YourFormName]![Frame1] = Option_One;

--
KARL DEWEY
Build a little - Test a little


:

I'm not familiar with union queries. Will the wizard guide me through
everything i need to use this? Also, in what fashion should the option group
be included in the criteria?

:

This is one way --
Create your queries and include the option group as criteria. Then combine
the two queries in a union query. Only the query that matches the option
selection will output records.
--
KARL DEWEY
Build a little - Test a little


:

I would like to build an option group with two options, if one option is
selected, a combo box displays one query's results, if the other option is
selected, a different query is populated into the combo box. How would i go
about doing this?
 
P

Pwyd

Whoops. tabbed out of that by accident.

Shows the two columns, the number "1" in the option_148 rows, for both values,
and then lists the two issues stored in that table, as it should.

*grumbles*


KARL DEWEY said:
This either means you do not have the form open and an option selected
OR
You have misspelled the names somewhere along the way.

What do you get when you run this query, selecting option 1 --
SELECT [ProcessorIssue],ProcessorIssueQuery AS Option_148
FROM [ProcessorIssueTable]
WHERE [FORMS]![ReversalCostpoint]![Frame145] = 1;

What do you get when you run this query, selecting option 2 --
Select [PCOIssue], PCOIssueQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

--
KARL DEWEY
Build a little - Test a little


Pwyd said:
SELECT [ProcessorIssue],ProcessorIssueQuery AS Option_148
FROM [ProcessorIssueTable]
WHERE [FORMS]![ReversalCostpoint]![Frame145] = 1
UNION ALL Select [PCOIssue], PCOIssueQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

It asks me for the frame value, and each of those query values. am i not
referring to the queries properly?

or the frame for that matter?

Pwyd said:
Nah. both of the tables these queries are drawing from are using text
fields, with nothing else changed on them. no validation rules or anything
like that. I'm still not clear on why it keeps asking me for the parameter
values for the two i listed earlier.


:


It is the source, you're correct. I was confused.


Running the Query with either button clicked gives no results :(
In datasheet form, the two columns don't have any rows.



:

I think the problem is in your union query.
Here are some rules for a union query --
The datatype of each field must match between the queries - first field
DateTime, second field Number-Long Integer, third field text, etc.

In the query below PCOProcessorIssueUnionQuery will appear as Option_148 in
both outputs.
Select ProcessorIssue, PCOProcessorIssueUnionQuery AS Option_148
From [ProcessorIssueTable]
Where [FORMS]![ReversalCostpoint]![Frame145] = 1
UNION ALL Select [PCOIssue], PCOProcessorIssueUnionQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

I though PCOProcessorIssueUnionQuery was the name of this query as you said
it was the source for the combo.

Try clicking an option and running the query and seeing the results. Then
click the other option and run it.

--
KARL DEWEY
Build a little - Test a little


:

Karl i think i'm missing something. Where do the two queries that represent
the two groups of different issues get added to the combo box if i'm only
pasting their criteria into the union query?


:

for the combo box's row source i was using the union query.

PCOProcessorIssueUnionQuery


:

I also ask you to post the Row Source of the combo.

Select ProcessorIssue, PCOProcessorIssueUnionQuery AS Option_148
From [ProcessorIssueTable]
Where [FORMS]![ReversalCostpoint]![Frame145] = 1
UNION ALL Select [PCOIssue], PCOProcessorIssueUnionQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = 2;

The criteria should be 1 for first query and 2 for the second.
--
KARL DEWEY
Build a little - Test a little


:

Here's what i've got, i'm sure seeing it will help:


Select ProcessorIssue PCOProcessorIssueUnionQuery AS Option_148
From [ProcessorIssueTable]
Where [FORMS]![ReversalCostpoint]![Frame145] = Option_148
UNION ALL Select [PCOIssue] PCOProcessorIssueUnionQuery AS Option_150
FROM [PCOIssueTable]
WHERE [Forms]![ReversalCostpoint]![Frame145] = Option_150;


:

Open the form in design view and look at the proprities of the combo. Copy
the Row Source and post.
Post the SQL of your query.

--
KARL DEWEY
Build a little - Test a little


:

Karl, the option button union query works just like you said it would, except
for one thing, that is perhaps because of my naivete. The query seems to
function properly, except that when switching between the two buttons,
instead of selecting the records i have for those fields in each of those
tables, which hold the various issues for each of those two options, it
simply displays the numbers "1" and "2" in the combo box, if you flip between
each of the options selected. That leads me to believe that "1" and "2"
before the AS statement should be replaced with something, in order to
reference each of the tables. What is it? Or is my intuition incorrect?

:

Thanks Karl, i'll give it a try in the next few days, and i'll definately
come back here with any issues i come upon. You've been very helpful.
Kind Regards,
Pwyd


:

One option is for Processor issues, the other is for PCO issues.
What I posted will do that for you by way of your queries.
The option group selection number will control wich part of the union query
will pull records. That query is in turn used as source for your combo box.
--
KARL DEWEY
Build a little - Test a little


:

The combo box shows a list of issues associated with the option chosen on the
option group. One option is for Processor issues, the other is for PCO
issues. I would like the combo box to allow selection of an issue that is
related to option chosen-- i'm going to be using the option group in some
data construction, counting the number of total errors, errors caused by
processor, errors caused by PCO, and so on, and i couldn't find an easy way
to count that, without a lot more code. Also, i didn't want to make two
seperate combo boxes, when all of the issues are stored on one table, that
seems silly.

Have any other suggestions besides what i'm trying to construct here?

:

Second part -- Also, in what fashion should the option group be included in
the criteria?

SELECT Field1, Field2, Field3, 1 AS Option_One
FROM Table1
WHERE [Forms]![YourFormName]![Frame1] = Option_One
UNION ALL SELECT Field1, Field2, Field3, 2 AS Option_One
FROM Table2
WHERE [Forms]![YourFormName]![Frame1] = Option_One;

--
KARL DEWEY
Build a little - Test a little


:

I'm not familiar with union queries. Will the wizard guide me through
everything i need to use this? Also, in what fashion should the option group
be included in the criteria?

:

This is one way --
Create your queries and include the option group as criteria. Then combine
the two queries in a union query. Only the query that matches the option
selection will output records.
--
KARL DEWEY
Build a little - Test a little


:

I would like to build an option group with two options, if one option is
selected, a combo box displays one query's results, if the other option is
selected, a different query is populated into the combo box. How would i go
about doing this?
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 

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