Query Question

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi,
I need someone to set me in right direction in my attempt to make this Query
By Form work. This is what I have now. I have a Query that works fine. Except
I want to use the Query Properties in another Query By Form I designed. I
will list the properties of both Queries so you can see how I am using them.
Here they are:
MY QUERY:
Field: dwFirstNumber
Table: QBF_tblNumbers
Sort:
Show: Is Checked
Criteria:
Or:
In the next column I have this:
Field: InStr([dwFirstNumber,Blank=All],[dwFirstNumber])
Table:
Sort:
Show: Is Unchecked
Criteria: >0Or Is Null
Or:

Now my Query By Form has these Properties:
Field: dwFirstNumber
Table: QBF_tblNumbers
Sort:
Show: Is Checked
Criteria: [Forms]![frmQBF]![txtFirstNumber]
Or:

That is it. Now what do I need to correct to make it work in my QBF.
Thanks for any help. I have tried a lot of things but keep trying. Hope
someone can help.
Thanks again,
Bill
 
Bill -

If you just need the restriction from the second column in your query to be
added to your new query, you can copy/paste the column into the new query.
You are obviously using different criteria for the first column between the
two because of the form, so I wouldn't expect the same results.

What is your new query doing that is not working for you?
 
Daryl,
Thanks for the help. This is what I have.
Table with 5 columns: Date-Game-1st Number, 2nd Number and 3rd Number.
My Query form has Text Boxes for: Start Date, End Date, 1st Number, 2nd
Number and 3rd Number. Plus a Command button to run the Query.
What I want is if I leave say 1st Number Blank and fill in the 2nd & 3rd
Number. It should show all results for my date range where the 2nd Number and
3rd Number equal the inputted text box. Most everything I tried came back
with no results or a message saying I cancelled the operation.
Thanks,
Bill


Daryl S said:
Bill -

If you just need the restriction from the second column in your query to be
added to your new query, you can copy/paste the column into the new query.
You are obviously using different criteria for the first column between the
two because of the form, so I wouldn't expect the same results.

What is your new query doing that is not working for you?

--
Daryl S


Bill said:
Hi,
I need someone to set me in right direction in my attempt to make this Query
By Form work. This is what I have now. I have a Query that works fine. Except
I want to use the Query Properties in another Query By Form I designed. I
will list the properties of both Queries so you can see how I am using them.
Here they are:
MY QUERY:
Field: dwFirstNumber
Table: QBF_tblNumbers
Sort:
Show: Is Checked
Criteria:
Or:
In the next column I have this:
Field: InStr([dwFirstNumber,Blank=All],[dwFirstNumber])
Table:
Sort:
Show: Is Unchecked
Criteria: >0Or Is Null
Or:

Now my Query By Form has these Properties:
Field: dwFirstNumber
Table: QBF_tblNumbers
Sort:
Show: Is Checked
Criteria: [Forms]![frmQBF]![txtFirstNumber]
Or:

That is it. Now what do I need to correct to make it work in my QBF.
Thanks for any help. I have tried a lot of things but keep trying. Hope
someone can help.
Thanks again,
Bill
 
Thanks. I could not understand how to enter the criteria I kept omitting the
"Or". Thanks again,
Bill

KenSheridan via AccessMonster.com said:
Dirk gave you an answer for this in your earlier thread, but you may not have
understood how to implement it in query design view. In the 'criteria' row
of the dwFirstNumber column put:

[Forms]![frmQBF]![txtFirstNumber] Or [Forms]![frmQBF]![txtFirstNumber] Is
Null

Ken Sheridan
Stafford, England
Hi,
I need someone to set me in right direction in my attempt to make this Query
By Form work. This is what I have now. I have a Query that works fine. Except
I want to use the Query Properties in another Query By Form I designed. I
will list the properties of both Queries so you can see how I am using them.
Here they are:
MY QUERY:
Field: dwFirstNumber
Table: QBF_tblNumbers
Sort:
Show: Is Checked
Criteria:
Or:
In the next column I have this:
Field: InStr([dwFirstNumber,Blank=All],[dwFirstNumber])
Table:
Sort:
Show: Is Unchecked
Criteria: >0Or Is Null
Or:

Now my Query By Form has these Properties:
Field: dwFirstNumber
Table: QBF_tblNumbers
Sort:
Show: Is Checked
Criteria: [Forms]![frmQBF]![txtFirstNumber]
Or:

That is it. Now what do I need to correct to make it work in my QBF.
Thanks for any help. I have tried a lot of things but keep trying. Hope
someone can help.
Thanks again,
Bill

--
Message posted via AccessMonster.com


.
 
Back
Top