SQL Query missing first number?

R

Randy

I have an append query which I've received help from this news group (John
Vinson), thanks John, It works great except the result is misssing the
first number of a range of numbers. If I enter 10000 in the fld
[BeginCertNolbl] and 10025 in the fld [EndCertNolbl] the result is the
number 10000 is missing from tbl "CheckedOutCertsAllNumbers". The first
number in the tbl is 10001. The last number comes out ok...Any Ideas?
Thanks again...Randy


INSERT INTO CheckedOutCertsAllNumbers ( CertNo, Inspector )
SELECT [N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl] AS Expr1,
CheckedOutCertificates.Inspector
FROM Num, CheckedOutCertificates
WHERE
((([N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl])<=[Forms]![frmCheckedOutCertificates]![EndCertNolbl])
AND
((CheckedOutCertificates.Inspector)=[Forms]![frmCheckedOutCertificates]![cboInspector]));
 
J

John Vinson

I have an append query which I've received help from this news group (John
Vinson), thanks John, It works great except the result is misssing the
first number of a range of numbers. If I enter 10000 in the fld
[BeginCertNolbl] and 10025 in the fld [EndCertNolbl] the result is the
number 10000 is missing from tbl "CheckedOutCertsAllNumbers". The first
number in the tbl is 10001. The last number comes out ok...Any Ideas?
Thanks again...Randy


INSERT INTO CheckedOutCertsAllNumbers ( CertNo, Inspector )
SELECT [N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl] AS Expr1,
CheckedOutCertificates.Inspector
FROM Num, CheckedOutCertificates
WHERE
((([N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl])<=[Forms]![frmCheckedOutCertificates]![EndCertNolbl])
AND
((CheckedOutCertificates.Inspector)=[Forms]![frmCheckedOutCertificates]![cboInspector]));

Do you have a record in Num with zero as the value of N? If not...
you'll get this result.

John W. Vinson[MVP]
 
R

Randy

That was it, Thanks John...Randy
John Vinson said:
I have an append query which I've received help from this news group (John
Vinson), thanks John, It works great except the result is misssing the
first number of a range of numbers. If I enter 10000 in the fld
[BeginCertNolbl] and 10025 in the fld [EndCertNolbl] the result is the
number 10000 is missing from tbl "CheckedOutCertsAllNumbers". The first
number in the tbl is 10001. The last number comes out ok...Any Ideas?
Thanks again...Randy


INSERT INTO CheckedOutCertsAllNumbers ( CertNo, Inspector )
SELECT [N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl] AS Expr1,
CheckedOutCertificates.Inspector
FROM Num, CheckedOutCertificates
WHERE
((([N]+[Forms]![frmCheckedOutCertificates]![BeginCertNolbl])<=[Forms]![frmCheckedOutCertificates]![EndCertNolbl])
AND
((CheckedOutCertificates.Inspector)=[Forms]![frmCheckedOutCertificates]![cboInspector]));

Do you have a record in Num with zero as the value of N? If not...
you'll get this result.

John W. Vinson[MVP]
 

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