Numeric Field Overflow

S

singingsister

I am a complete Access newbie and am stuck!

I have an excel spreadsheet which is basically our order book. It shows all
orders placed on our companies and information like company information, what
date the factory say the order should be d espatched and what date the order
is actually despatched.

I have linked the excel sheet to my access database with no problems.

What I want to do is run two queries that I can run on an as and when basis
to show
1st query) orders due within a certain time period (ie 2 weeks from todays
date)
2nd query) orders that are late and have not been shipped.

I have, with help from a colleague managed do create a query for the orders
due within a certain time period, using BETWEEN [FROM] AND [TO] under the
"date the factory say the order will be despatched" and IS NULL under "actual
despatch date" (I want it to show orders that have NOT been despatched) On my
order book, I fill in a date under "actual despatch date" when I know the
order has been shipped.

Problem is, I keep getting a NUMERIC FIELD OVERFLOW. Sometimes I can get the
query to run once and then the second time I run it I get the error. Now I
know on my excel sheet, that in some cases there is a "-" under actual
despatch date but I am happy for access to show this as "-" and I can deal
with this as necessary.

For the 2nd query - I have used the criteria <DATE() under "date the factory
say the order will be despatched" and IS NULL under "actual despatch date" (I
want it to show orders that have NOT been despatched). The query runs fine
but for some reason it is showing ALL orders with an "date the factory say
the order will be despatched" regardless of whether it has a date on the
"actual despatch date". I only want it to show orders which DO NOT have a
date in the "actual despatch date" column.

Can someone please help me? I am tearing my hair out!!!
 
T

Tom van Stiphout

I'm sure it's not because you misspell "dispatch" :)

Put the linked table in design view. Check if the dates in question
have a data type of Date/Time. Maybe they aren't and a date of
09-23-2008 could be taken as a numeric expression that yields -2022.

Do you ONLY have criteria on these date fields, or do you have
additional expressions as well?

-Tom.
Microsoft Access MVP
 
S

singingsister

Tom

I checked the linked table in design mode and it's definately down as
date/time. I'm in the UK so it shows as 22/09/2008 which is fine.
I'm sure it's not because you misspell "dispatch" :)

Put the linked table in design view. Check if the dates in question
have a data type of Date/Time. Maybe they aren't and a date of
09-23-2008 could be taken as a numeric expression that yields -2022.

Do you ONLY have criteria on these date fields, or do you have
additional expressions as well?

-Tom.
Microsoft Access MVP
I am a complete Access newbie and am stuck!
[quoted text clipped - 33 lines]
Can someone please help me? I am tearing my hair out!!!
 
S

singingsister

Forgot to answer your second question. I'm not 100% sure what you mean but
if you mean the
BETWEEN [FROM] AND [TO] bits, then yes - just criteria.
I'm sure it's not because you misspell "dispatch" :)

Put the linked table in design view. Check if the dates in question
have a data type of Date/Time. Maybe they aren't and a date of
09-23-2008 could be taken as a numeric expression that yields -2022.

Do you ONLY have criteria on these date fields, or do you have
additional expressions as well?

-Tom.
Microsoft Access MVP
I am a complete Access newbie and am stuck!
[quoted text clipped - 33 lines]
Can someone please help me? I am tearing my hair out!!!
 
J

John Spencer

The numeric field overflow is being caused by the link to the Excel
Spreadsheet. The presence of the "-" in a field that has been typed as a
datetime field will cause the problem. You can clean up the Excel sheet and
get rid of the "bad" data and see if you still have the problem.

Second problem could be that the field Actual Despatch Date contains a string
of 0 to many spaces and is not really null - it only looks as if it could be
to the human eye.

Try criteria of
Is Not Null OR <> ""

If that fails try building a calculated column
Field: Trim([Actual Despatch Date] & "")
Criteria : <> ""


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
S

singingsister via AccessMonster.com

John,
Thanks.

I'll go through the excel sheet and remove the "-" however I need to put
something in this column rather than leaving it blank. Is there anything I
can put in that won't cause this numeric field overlflow?


John said:
The numeric field overflow is being caused by the link to the Excel
Spreadsheet. The presence of the "-" in a field that has been typed as a
datetime field will cause the problem. You can clean up the Excel sheet and
get rid of the "bad" data and see if you still have the problem.

Second problem could be that the field Actual Despatch Date contains a string
of 0 to many spaces and is not really null - it only looks as if it could be
to the human eye.

Try criteria of
Is Not Null OR <> ""

If that fails try building a calculated column
Field: Trim([Actual Despatch Date] & "")
Criteria : <> ""

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
I am a complete Access newbie and am stuck!
[quoted text clipped - 33 lines]
Can someone please help me? I am tearing my hair out!!!
 
S

singingsister via AccessMonster.com

Also, some of the dates in the acknowledged despatch date column have two
dates (where a delivery is in two shipments). Is this contributing to the
problem?
John,
Thanks.

I'll go through the excel sheet and remove the "-" however I need to put
something in this column rather than leaving it blank. Is there anything I
can put in that won't cause this numeric field overlflow?
The numeric field overflow is being caused by the link to the Excel
Spreadsheet. The presence of the "-" in a field that has been typed as a
[quoted text clipped - 22 lines]
 
S

singingsister via AccessMonster.com

Also, some of the dates in the acknowledged despatch date column have two
dates (where a delivery is in two shipments). Is this contributing to the
problem?
John,
Thanks.

I'll go through the excel sheet and remove the "-" however I need to put
something in this column rather than leaving it blank. Is there anything I
can put in that won't cause this numeric field overlflow?
The numeric field overflow is being caused by the link to the Excel
Spreadsheet. The presence of the "-" in a field that has been typed as a
[quoted text clipped - 22 lines]
 
J

John Spencer

I would say that you either have to leave the field blank or you must put in
some kind of default date that is impossible such as 1/1/3000.

Yes, having two dates in one field is also going to cause a problem and will
probably generate an error.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Also, some of the dates in the acknowledged despatch date column have two
dates (where a delivery is in two shipments). Is this contributing to the
problem?
John,
Thanks.

I'll go through the excel sheet and remove the "-" however I need to put
something in this column rather than leaving it blank. Is there anything I
can put in that won't cause this numeric field overlflow?
The numeric field overflow is being caused by the link to the Excel
Spreadsheet. The presence of the "-" in a field that has been typed as a
[quoted text clipped - 22 lines]
Can someone please help me? I am tearing my hair out!!!
 
T

Tom van Stiphout

Make that DEFINITELY generate an error!
If you have a DateTime field, you can store a SINGLE date there, not
multiple.

-Tom.
Microsoft Access MVP


I would say that you either have to leave the field blank or you must put in
some kind of default date that is impossible such as 1/1/3000.

Yes, having two dates in one field is also going to cause a problem and will
probably generate an error.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Also, some of the dates in the acknowledged despatch date column have two
dates (where a delivery is in two shipments). Is this contributing to the
problem?
John,
Thanks.

I'll go through the excel sheet and remove the "-" however I need to put
something in this column rather than leaving it blank. Is there anything I
can put in that won't cause this numeric field overlflow?

The numeric field overflow is being caused by the link to the Excel
Spreadsheet. The presence of the "-" in a field that has been typed as a
[quoted text clipped - 22 lines]
Can someone please help me? I am tearing my hair out!!!
 
S

singingsister via AccessMonster.com

I've now changed the "-" fields to 01/01/1900 but I'm not sure how to get
around the 2 dates in one field column. I can't add another column because
the spreadsheet feeds other reports and this may muck up the formula.

Any suggestions?

I am happy for the access query to just show what is in the field (the 2
dates as on the excel sheet) then it is up to me to filter it accordingly.

John said:
I would say that you either have to leave the field blank or you must put in
some kind of default date that is impossible such as 1/1/3000.

Yes, having two dates in one field is also going to cause a problem and will
probably generate an error.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Also, some of the dates in the acknowledged despatch date column have two
dates (where a delivery is in two shipments). Is this contributing to the
[quoted text clipped - 11 lines]
[quoted text clipped - 22 lines]
Can someone please help me? I am tearing my hair out!!!
 
J

John Spencer

No, I have no idea how you are going to handle this using a linked Excel
sheet. If you import the data to a predefined table then you could specify
the field as text. OR you can save the spreadsheet as a text file - that will
allow you to define the field types as text and then you can use VBA functions
in Access to test the field to see if it can be considered a date and if so
you can convert it.

IIF(IsDate([Despatch Date],CDate{[Despatch Date]),Null)

You are still going to have a problem on how to handle the values that are not
a date.

Good luck

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
I've now changed the "-" fields to 01/01/1900 but I'm not sure how to get
around the 2 dates in one field column. I can't add another column because
the spreadsheet feeds other reports and this may muck up the formula.

Any suggestions?

I am happy for the access query to just show what is in the field (the 2
dates as on the excel sheet) then it is up to me to filter it accordingly.

John said:
I would say that you either have to leave the field blank or you must put in
some kind of default date that is impossible such as 1/1/3000.

Yes, having two dates in one field is also going to cause a problem and will
probably generate an error.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Also, some of the dates in the acknowledged despatch date column have two
dates (where a delivery is in two shipments). Is this contributing to the
[quoted text clipped - 11 lines]
[quoted text clipped - 22 lines]
Can someone please help me? I am tearing my hair out!!!
 

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