If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Criteria based on checkbox
On Tue, 1 Dec 2009 07:13:02 -0800, Paul Washburn
wrote: Code:
([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] Update: The code above is working very sparadically. Ill run it once and get nothing, run it again and get all results, run it a third time and get the correct results. In the background the criteria is getting moved around, added as new fields, and duplicated throughout the criteria. Please post the *complete* SQL view of the query. As written it appears that this criterion will return the record if chkEDI is False or if it is True - i.e. I'd expect it to return all records. I'm sure that's not the case, so there's something else going on in the query! -- John W. Vinson [MVP] |
#12
|
|||
|
|||
Criteria based on checkbox
I built the query using the query builder in access, so i the only additional
code is the default code from the builder. Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE (((bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); For the chkedi field. Thanks "John W. Vinson" wrote: On Tue, 1 Dec 2009 07:13:02 -0800, Paul Washburn wrote: Code:
([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] Update: The code above is working very sparadically. Ill run it once and get nothing, run it again and get all results, run it a third time and get the correct results. In the background the criteria is getting moved around, added as new fields, and duplicated throughout the criteria. Please post the *complete* SQL view of the query. As written it appears that this criterion will return the record if chkEDI is False or if it is True - i.e. I'd expect it to return all records. I'm sure that's not the case, so there's something else going on in the query! -- John W. Vinson [MVP] . |
#13
|
|||
|
|||
Criteria based on checkbox
I built the query using the query builder in access, so i the only additional
code is the default code from the builder. Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE (((bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); For the chkedi field. Thanks "John W. Vinson" wrote: On Tue, 1 Dec 2009 07:13:02 -0800, Paul Washburn wrote: Code:
([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] Update: The code above is working very sparadically. Ill run it once and get nothing, run it again and get all results, run it a third time and get the correct results. In the background the criteria is getting moved around, added as new fields, and duplicated throughout the criteria. Please post the *complete* SQL view of the query. As written it appears that this criterion will return the record if chkEDI is False or if it is True - i.e. I'd expect it to return all records. I'm sure that's not the case, so there's something else going on in the query! -- John W. Vinson [MVP] . |
#14
|
|||
|
|||
Criteria based on checkbox
I built the query using the query builder in access, so i the only additional
code is the default code from the builder. Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE (((bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); For the chkedi field. Thanks "John W. Vinson" wrote: On Tue, 1 Dec 2009 07:13:02 -0800, Paul Washburn wrote: Code:
([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] Update: The code above is working very sparadically. Ill run it once and get nothing, run it again and get all results, run it a third time and get the correct results. In the background the criteria is getting moved around, added as new fields, and duplicated throughout the criteria. Please post the *complete* SQL view of the query. As written it appears that this criterion will return the record if chkEDI is False or if it is True - i.e. I'd expect it to return all records. I'm sure that's not the case, so there's something else going on in the query! -- John W. Vinson [MVP] . |
#15
|
|||
|
|||
Criteria based on checkbox
On Tue, 1 Dec 2009 09:58:02 -0800, Paul Washburn
wrote: I built the query using the query builder in access, so i the only additional code is the default code from the builder. Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE (((bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); The code i posted earlier was placed in the criteria section of the builder. For the chkedi field. So you had ([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] as a criterion? That doesn't resemble what you posted as the SQL of the query. What are form_name and chkEdi? I missed some of the start of this thread and I'm not sure of the context here! -- John W. Vinson [MVP] |
#16
|
|||
|
|||
Criteria based on checkbox
On Tue, 1 Dec 2009 09:58:02 -0800, Paul Washburn
wrote: I built the query using the query builder in access, so i the only additional code is the default code from the builder. Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE (((bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); The code i posted earlier was placed in the criteria section of the builder. For the chkedi field. So you had ([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] as a criterion? That doesn't resemble what you posted as the SQL of the query. What are form_name and chkEdi? I missed some of the start of this thread and I'm not sure of the context here! -- John W. Vinson [MVP] |
#17
|
|||
|
|||
Criteria based on checkbox
On Tue, 1 Dec 2009 09:58:02 -0800, Paul Washburn
wrote: I built the query using the query builder in access, so i the only additional code is the default code from the builder. Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE (((bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); The code i posted earlier was placed in the criteria section of the builder. For the chkedi field. So you had ([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] as a criterion? That doesn't resemble what you posted as the SQL of the query. What are form_name and chkEdi? I missed some of the start of this thread and I'm not sure of the context here! -- John W. Vinson [MVP] |
#18
|
|||
|
|||
Criteria based on checkbox
Yes, ([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] was
originally entered as criteria. Didnt even know about the sql code in the background until you asked about it. Started the form again and watched the code in the background this time. The code started as Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE ((([Forms]![FormRpt]![chkEdi]=False) Or (bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); produced no records; and then a third time unchecked which produced all records and modified the code to this: Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE ((([Forms]![FormRpt]![chkEdi]=False) Or (bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); work something along the lines of (chkbox A, select statement, chkbox b, select statement, chkbox A and chkbox B, select statement) Thanks for the help "John W. Vinson" wrote: On Tue, 1 Dec 2009 09:58:02 -0800, Paul Washburn wrote: I built the query using the query builder in access, so i the only additional code is the default code from the builder. Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE (((bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); The code i posted earlier was placed in the criteria section of the builder. For the chkedi field. So you had ([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] as a criterion? That doesn't resemble what you posted as the SQL of the query. What are form_name and chkEdi? I missed some of the start of this thread and I'm not sure of the context here! -- John W. Vinson [MVP] . |
#19
|
|||
|
|||
Criteria based on checkbox
Yes, ([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] was
originally entered as criteria. Didnt even know about the sql code in the background until you asked about it. Started the form again and watched the code in the background this time. The code started as Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE ((([Forms]![FormRpt]![chkEdi]=False) Or (bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); produced no records; and then a third time unchecked which produced all records and modified the code to this: Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE ((([Forms]![FormRpt]![chkEdi]=False) Or (bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); work something along the lines of (chkbox A, select statement, chkbox b, select statement, chkbox A and chkbox B, select statement) Thanks for the help "John W. Vinson" wrote: On Tue, 1 Dec 2009 09:58:02 -0800, Paul Washburn wrote: I built the query using the query builder in access, so i the only additional code is the default code from the builder. Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE (((bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); The code i posted earlier was placed in the criteria section of the builder. For the chkedi field. So you had ([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] as a criterion? That doesn't resemble what you posted as the SQL of the query. What are form_name and chkEdi? I missed some of the start of this thread and I'm not sure of the context here! -- John W. Vinson [MVP] . |
#20
|
|||
|
|||
Criteria based on checkbox
Yes, ([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] was
originally entered as criteria. Didnt even know about the sql code in the background until you asked about it. Started the form again and watched the code in the background this time. The code started as Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE ((([Forms]![FormRpt]![chkEdi]=False) Or (bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); produced no records; and then a third time unchecked which produced all records and modified the code to this: Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE ((([Forms]![FormRpt]![chkEdi]=False) Or (bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); work something along the lines of (chkbox A, select statement, chkbox b, select statement, chkbox A and chkbox B, select statement) Thanks for the help "John W. Vinson" wrote: On Tue, 1 Dec 2009 09:58:02 -0800, Paul Washburn wrote: I built the query using the query builder in access, so i the only additional code is the default code from the builder. Code:
SELECT bncforms_table.formnumber, bncforms_table.form_name, bncforms_table.edi, bncforms_table.events, bncforms_table.[Weather Ntc], bncforms_table.[No Enter] FROM bncforms_table WHERE (((bncforms_table.form_name)=[Forms]![FormRpt]![chkEdi])); The code i posted earlier was placed in the criteria section of the builder. For the chkedi field. So you had ([Forms]![FormRpt]![chkEdi]=False) Or [Forms]![FormRpt]![chkEdi] as a criterion? That doesn't resemble what you posted as the SQL of the query. What are form_name and chkEdi? I missed some of the start of this thread and I'm not sure of the context here! -- John W. Vinson [MVP] . |
Thread Tools | |
Display Modes | |
|
|