PC Review


Reply
Thread Tools Rate Thread

Append Query - no records with #Num!

 
 
Adam
Guest
Posts: n/a
 
      28th Dec 2009
Hi All

I have a table linked to an Excel spreadsheet, which has formulas in
it like If(a2="","",now() ).

When i go to the linked table in Access, it shows <>"#Num!" whenever I
have the formula and there is no data in A2, of course...

But I want to create an append query from this table, and only append
records that do not have #Num! recorded.

Is there a criteria I can input that says <>"#Num!" that will work for
this situation?

Hope someone can help,

Kind regards
Adam
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      28th Dec 2009
The problem is that Now is a numeric field, whereas "" is a text field.

If you have control over the spreadsheet, try changing it to

If(a2="", Null, Now())

You would then use IS NOT NULL as your condition.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Adam" <(E-Mail Removed)> wrote in message
news:4f33b6d4-451a-47e7-882d-(E-Mail Removed)...
> Hi All
>
> I have a table linked to an Excel spreadsheet, which has formulas in
> it like If(a2="","",now() ).
>
> When i go to the linked table in Access, it shows <>"#Num!" whenever I
> have the formula and there is no data in A2, of course...
>
> But I want to create an append query from this table, and only append
> records that do not have #Num! recorded.
>
> Is there a criteria I can input that says <>"#Num!" that will work for
> this situation?
>
> Hope someone can help,
>
> Kind regards
> Adam


 
Reply With Quote
 
Adam
Guest
Posts: n/a
 
      28th Dec 2009
On Dec 28, 12:09*pm, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_gmail.com> wrote:
> The problem is that Now is a numeric field, whereas "" is a text field.
>
> If you have control over the spreadsheet, try changing it to
>
> If(a2="", Null, Now())
>
> You would then use IS NOT NULL as your condition.
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no e-mails, please!)
>
> "Adam" <evansada...@googlemail.com> wrote in message
>
> news:4f33b6d4-451a-47e7-882d-(E-Mail Removed)...
>
>
>
> > Hi All

>
> > I have a table linked to an Excel spreadsheet, which has formulas in
> > it like If(a2="","",now() ).

>
> > When i go to the linked table in Access, it shows <>"#Num!" whenever I
> > have the formula and there is no data in A2, of course...

>
> > But I want to create an append query from this table, and only append
> > records that do not have #Num! recorded.

>
> > Is there a criteria I can input that says <>"#Num!" that will work for
> > this situation?

>
> > Hope someone can help,

>
> > Kind regards
> > Adam


Brill - thanks Doug!
 
Reply With Quote
 
Maarkr
Guest
Posts: n/a
 
      28th Dec 2009
You can try to correct the formula in Excel so the field is imported as a
numeric or date value (instead of "", insert "1/1/1950" and filter it out in
the query), or since the #NUM is probably a null value in Access, you may be
able to filter it out in the query with a criteria like 'NOT IS NULL'



"Adam" wrote:

> Hi All
>
> I have a table linked to an Excel spreadsheet, which has formulas in
> it like If(a2="","",now() ).
>
> When i go to the linked table in Access, it shows <>"#Num!" whenever I
> have the formula and there is no data in A2, of course...
>
> But I want to create an append query from this table, and only append
> records that do not have #Num! recorded.
>
> Is there a criteria I can input that says <>"#Num!" that will work for
> this situation?
>
> Hope someone can help,
>
> Kind regards
> Adam
> .
>

 
Reply With Quote
 
Adam
Guest
Posts: n/a
 
      28th Dec 2009
On Dec 28, 12:50*pm, Maarkr <Maa...@discussions.microsoft.com> wrote:
> You can try to correct the formula in Excel so the field is imported as a
> numeric or date value (instead of "", insert "1/1/1950" and filter it outin
> the query), or since the #NUM is probably a null value in Access, you maybe
> able to filter it out in the query with a criteria like 'NOT IS NULL'
>
>
>
> "Adam" wrote:
> > Hi All

>
> > I have a table linked to an Excel spreadsheet, which has formulas in
> > it like If(a2="","",now() ).

>
> > When i go to the linked table in Access, it shows <>"#Num!" whenever I
> > have the formula and there is no data in A2, of course...

>
> > But I want to create an append query from this table, and only append
> > records that do not have #Num! recorded.

>
> > Is there a criteria I can input that says <>"#Num!" that will work for
> > this situation?

>
> > Hope someone can help,

>
> > Kind regards
> > Adam
> > .


The problem I've now come across is the table I've linked to the Excel
spreadsheet has two of the fields recorded as 'Double' formats...
however all of my other tables are working with Long Integers, which I
cannot change...


How can I get the linked table (excel spreadsheet) to have long
integers for 2 of its fields instead of doubles?
 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      29th Dec 2009
I'm not sure you can.

However, if your concern is to be able to join the fields, you can still
join them. You'll have to go into the SQL of the query and use the CLng
function on the Double field.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Adam" <(E-Mail Removed)> wrote in message
news:76983df3-e415-4a94-b977-(E-Mail Removed)...
On Dec 28, 12:50 pm, Maarkr <Maa...@discussions.microsoft.com> wrote:
> You can try to correct the formula in Excel so the field is imported as a
> numeric or date value (instead of "", insert "1/1/1950" and filter it out
> in
> the query), or since the #NUM is probably a null value in Access, you may
> be
> able to filter it out in the query with a criteria like 'NOT IS NULL'
>
>
>
> "Adam" wrote:
> > Hi All

>
> > I have a table linked to an Excel spreadsheet, which has formulas in
> > it like If(a2="","",now() ).

>
> > When i go to the linked table in Access, it shows <>"#Num!" whenever I
> > have the formula and there is no data in A2, of course...

>
> > But I want to create an append query from this table, and only append
> > records that do not have #Num! recorded.

>
> > Is there a criteria I can input that says <>"#Num!" that will work for
> > this situation?

>
> > Hope someone can help,

>
> > Kind regards
> > Adam
> > .


The problem I've now come across is the table I've linked to the Excel
spreadsheet has two of the fields recorded as 'Double' formats...
however all of my other tables are working with Long Integers, which I
cannot change...


How can I get the linked table (excel spreadsheet) to have long
integers for 2 of its fields instead of doubles?

 
Reply With Quote
 
Adam
Guest
Posts: n/a
 
      30th Dec 2009
On 29 Dec, 01:28, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_gmail.com> wrote:
> I'm not sure you can.
>
> However, if your concern is to be able to join the fields, you can still
> join them. You'll have to go into the SQL of the query and use the CLng
> function on the Double field.
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no e-mails, please!)
>
> "Adam" <evansada...@googlemail.com> wrote in message
>
> news:76983df3-e415-4a94-b977-(E-Mail Removed)...
> On Dec 28, 12:50 pm, Maarkr <Maa...@discussions.microsoft.com> wrote:
>
>
>
>
>
> > You can try to correct the formula in Excel so the field is imported as a
> > numeric or date value (instead of "", insert "1/1/1950" and filter it out
> > in
> > the query), or since the #NUM is probably a null value in Access, you may
> > be
> > able to filter it out in the query with a criteria like 'NOT IS NULL'

>
> > "Adam" wrote:
> > > Hi All

>
> > > I have a table linked to an Excel spreadsheet, which has formulas in
> > > it like If(a2="","",now() ).

>
> > > When i go to the linked table in Access, it shows <>"#Num!" whenever I
> > > have the formula and there is no data in A2, of course...

>
> > > But I want to create an append query from this table, and only append
> > > records that do not have #Num! recorded.

>
> > > Is there a criteria I can input that says <>"#Num!" that will work for
> > > this situation?

>
> > > Hope someone can help,

>
> > > Kind regards
> > > Adam
> > > .

>
> The problem I've now come across is the table I've linked to the Excel
> spreadsheet has two of the fields recorded as 'Double' formats...
> however all of my other tables are working with Long Integers, which I
> cannot change...
>
> How can I get the linked table (excel spreadsheet) to have long
> integers for 2 of its fields instead of doubles?


That has got around the problem.

thank you Doug!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append only new records with an append Query ram Microsoft Access 1 23rd Mar 2009 05:50 PM
Main Switchboard can't append all the records in the append query =?Utf-8?B?U2hlbGw=?= Microsoft Access 0 2nd Jul 2007 11:34 AM
Append query - only want to append new records Mandi Microsoft Access Queries 2 24th Feb 2005 08:06 PM
Error trapping for "MS Access can't append all the records in the append query" Dale Microsoft Access VBA Modules 6 29th Dec 2004 02:27 AM
can't append records in append query Greg Clements Microsoft Access Queries 1 2nd Jul 2004 04:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:56 PM.