This is what I got and its still return 0
=DCount("[Doc_ID]","tblDocumentMain","[DocType] LIKE '*.mdb*' OR [DocType] LIKE '*.accdb*'")
With Warm Regards,
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265 Ext. 130
Fax (605)964-1070
"Valar Dohaeris"
From: John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
To: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com>
Sent: Tuesday, August 29, 2017 09:57:11 AM
Subject: Re: [MS_AccessPros] DCount expression not working
Art-
Note with my test that the .mdb or .accdb must be at the very end of the file name. If there's a trailing blank or other characters, you won't get a match. You could try adding an asterisk at the end.
"[DocType] LIKE '*.mdb*' OR [DocType] LIKE '*.accdb*'"
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Aug 29, 2017, at 4:01 PM, Art Lorenzini dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
I tried this and it returns 0 and I check the underlying table and there are 3 records that match that criteria.
With Warm Regards,
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265 Ext. 130
Fax (605)964-1070
"Valar Dohaeris"
From: John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Tuesday, August 29, 2017 01:48:36 AM
Subject: Re: [MS_AccessPros] DCount expression not working
Art-
Third parameter:
"[DocType] LIKE '*.mdb' OR [DocType] LIKE '*.accdb'"
Notice that I changed your parameter string to look for characters on the end of the string and included a '.'. Your original test would include any file name that just happened to have "mdb" somewhere in the name.
John Viescas, author
John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications
On Aug 29, 2017, at 03:16, Art Lorenzini dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
I actually found the solution but now I have to add another Like to it to cove accdb...
=DCount("[Doc_ID]","tblDocumentMain","[DOCTYPE] Like '*mdb*'")
With Warm Regards,
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265 Ext. 130
Fax (605)964-1070
"Valar Dohaeris"
Sent: Monday, August 28, 2017 07:43:52 PM
Subject: [MS_AccessPros] DCount expression not working
__._,_.___
Posted by: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (7) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar