SQL Query missing first number?

  • Thread starter Thread starter Randy
  • Start date Start date
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]));
 
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]
 
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]
 
Back
Top