Using toggle buttons in a complex query (complex for me, at least)

G

Guest

Okay here goes.

I am very new to access and am building or attempting to build a video
archive for a company. I have made a start up form that allows the user to
choose to either add records, search for particular footage, and print labels.

I'm doing alright on the labels and adding footage, but the searchign has
got me down. My preference would to have on the start up form (from left to
right) a toggle button arrangement for types of footage (i.e. Master, B-Roll,
Conferences) then a text box where the user can enter the keyword desired
(basketball, school children, whatever) and then a command button that would
search for the keyword in the designated type of footage.

I can get the command button to run a parameter wildcard query for footage
in a "details" field in my archive table, but how do I get it to filter
depending on the toggle buttons.

I'm sure this is really simple (and I think it has to do with AfterUpdate)
and I've read the other discussions on here but really couldn't find an
answer that worked.

Also, this is more of a query question but, is there a way I can get the
query to look at two fields, (both a details and title field) for the search
criteria.

Thanks for your help in advance,
Billy
 
G

Guest

In your query make a field --
Field XX: 0 (That is a zero)
Criteria [Forms]![YourForm]![YourButton]

When the button is clicked it will be -1 (minus one) and when unclicked it
will be 0 (zero).

Your other about title and description --
Field Title Description
Criteria Like "*" & [Enter phrase] & "*"
Criteria Like "*" &
[Enter phrase] & "*"

Copy and paste the criteria for Description on second line so it will be
exactly the same and you need only enter it once.
 
G

Guest

Thanks a lot Karl.

I do have one question though. I didn't really understand how the field
that needed to be zero worked so I kind of tinkered around with the toggle
buttons. I realiezed that by changing the values of the different toggles to
the corresponding number of the type (my table has a combo list for the
types, so Type1 is actually 3 and Tpe 4 is 6 and so on) This works, almost
perfectly.

However, I have a problem that in some of my searches, I get returned
records that do not correspond with the type I have toggled. Is this because
of the zero field and my query's lack thereof? If so, could I get a little
more detail as to how and why I would need that field?

Thank you again,
Billy

KARL DEWEY said:
In your query make a field --
Field XX: 0 (That is a zero)
Criteria [Forms]![YourForm]![YourButton]

When the button is clicked it will be -1 (minus one) and when unclicked it
will be 0 (zero).

Your other about title and description --
Field Title Description
Criteria Like "*" & [Enter phrase] & "*"
Criteria Like "*" &
[Enter phrase] & "*"

Copy and paste the criteria for Description on second line so it will be
exactly the same and you need only enter it once.



Billy said:
Okay here goes.

I am very new to access and am building or attempting to build a video
archive for a company. I have made a start up form that allows the user to
choose to either add records, search for particular footage, and print labels.

I'm doing alright on the labels and adding footage, but the searchign has
got me down. My preference would to have on the start up form (from left to
right) a toggle button arrangement for types of footage (i.e. Master, B-Roll,
Conferences) then a text box where the user can enter the keyword desired
(basketball, school children, whatever) and then a command button that would
search for the keyword in the designated type of footage.

I can get the command button to run a parameter wildcard query for footage
in a "details" field in my archive table, but how do I get it to filter
depending on the toggle buttons.

I'm sure this is really simple (and I think it has to do with AfterUpdate)
and I've read the other discussions on here but really couldn't find an
answer that worked.

Also, this is more of a query question but, is there a way I can get the
query to look at two fields, (both a details and title field) for the search
criteria.

Thanks for your help in advance,
Billy
 
G

Guest

Toggle buttons only have two values - zero & minus one.

It sounds like you are using a Combo or List Box. But what is a "zero field"?

Billy said:
Thanks a lot Karl.

I do have one question though. I didn't really understand how the field
that needed to be zero worked so I kind of tinkered around with the toggle
buttons. I realiezed that by changing the values of the different toggles to
the corresponding number of the type (my table has a combo list for the
types, so Type1 is actually 3 and Tpe 4 is 6 and so on) This works, almost
perfectly.

However, I have a problem that in some of my searches, I get returned
records that do not correspond with the type I have toggled. Is this because
of the zero field and my query's lack thereof? If so, could I get a little
more detail as to how and why I would need that field?

Thank you again,
Billy

KARL DEWEY said:
In your query make a field --
Field XX: 0 (That is a zero)
Criteria [Forms]![YourForm]![YourButton]

When the button is clicked it will be -1 (minus one) and when unclicked it
will be 0 (zero).

Your other about title and description --
Field Title Description
Criteria Like "*" & [Enter phrase] & "*"
Criteria Like "*" &
[Enter phrase] & "*"

Copy and paste the criteria for Description on second line so it will be
exactly the same and you need only enter it once.



Billy said:
Okay here goes.

I am very new to access and am building or attempting to build a video
archive for a company. I have made a start up form that allows the user to
choose to either add records, search for particular footage, and print labels.

I'm doing alright on the labels and adding footage, but the searchign has
got me down. My preference would to have on the start up form (from left to
right) a toggle button arrangement for types of footage (i.e. Master, B-Roll,
Conferences) then a text box where the user can enter the keyword desired
(basketball, school children, whatever) and then a command button that would
search for the keyword in the designated type of footage.

I can get the command button to run a parameter wildcard query for footage
in a "details" field in my archive table, but how do I get it to filter
depending on the toggle buttons.

I'm sure this is really simple (and I think it has to do with AfterUpdate)
and I've read the other discussions on here but really couldn't find an
answer that worked.

Also, this is more of a query question but, is there a way I can get the
query to look at two fields, (both a details and title field) for the search
criteria.

Thanks for your help in advance,
Billy
 
G

Guest

Hi Karl,

Sorry it took me a few days to get back to you, I was away from work.

I was curious about when you wrote:
"In your query make a field --
Field XX: 0 (That is a zero)
Criteria [Forms]![YourForm]![YourButton]"

What exactly do I do? Type "XX: 0" as the field name?

I keep getting very mixed results from the searches I have. Like a few
different types (types not listed in the toggle) are showing up with the
searches.

Sorry for the inconvience, I'm still getting my feet wet.

-Billy


KARL DEWEY said:
Toggle buttons only have two values - zero & minus one.

It sounds like you are using a Combo or List Box. But what is a "zero field"?

Billy said:
Thanks a lot Karl.

I do have one question though. I didn't really understand how the field
that needed to be zero worked so I kind of tinkered around with the toggle
buttons. I realiezed that by changing the values of the different toggles to
the corresponding number of the type (my table has a combo list for the
types, so Type1 is actually 3 and Tpe 4 is 6 and so on) This works, almost
perfectly.

However, I have a problem that in some of my searches, I get returned
records that do not correspond with the type I have toggled. Is this because
of the zero field and my query's lack thereof? If so, could I get a little
more detail as to how and why I would need that field?

Thank you again,
Billy

KARL DEWEY said:
In your query make a field --
Field XX: 0 (That is a zero)
Criteria [Forms]![YourForm]![YourButton]

When the button is clicked it will be -1 (minus one) and when unclicked it
will be 0 (zero).

Your other about title and description --
Field Title Description
Criteria Like "*" & [Enter phrase] & "*"
Criteria Like "*" &
[Enter phrase] & "*"

Copy and paste the criteria for Description on second line so it will be
exactly the same and you need only enter it once.



:

Okay here goes.

I am very new to access and am building or attempting to build a video
archive for a company. I have made a start up form that allows the user to
choose to either add records, search for particular footage, and print labels.

I'm doing alright on the labels and adding footage, but the searchign has
got me down. My preference would to have on the start up form (from left to
right) a toggle button arrangement for types of footage (i.e. Master, B-Roll,
Conferences) then a text box where the user can enter the keyword desired
(basketball, school children, whatever) and then a command button that would
search for the keyword in the designated type of footage.

I can get the command button to run a parameter wildcard query for footage
in a "details" field in my archive table, but how do I get it to filter
depending on the toggle buttons.

I'm sure this is really simple (and I think it has to do with AfterUpdate)
and I've read the other discussions on here but really couldn't find an
answer that worked.

Also, this is more of a query question but, is there a way I can get the
query to look at two fields, (both a details and title field) for the search
criteria.

Thanks for your help in advance,
Billy
 

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