Kevin-
The fact that DLookup fails tells me the values aren't exactly the same. Are you sure there are no trailing or leading blanks in any of the values?
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 Mar 7, 2017, at 10:55 AM, 'qingqinga@yahoo.com' qingqinga@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
John-
The "MenuListID" fields are all empty after running the query. Yes. MenuListFrm and EmployeeMenuFrm have exact same string value.
Best Regards,
Kevin
Date: 2017-03-07 17:41Subject: Re: [MS_AccessPros] Query doesn't get expeced result
But you *are* doing a "join" on MenuListFrm in tblMenuList and EmployeeMenuFrm in the table in this query. What do you mean by "it doesn't work"? Do you get no result? Note that there must be an exact match of MenuListFrm and EmployeeMenuFrm.
John Viescas, AuthorEffective SQLSQL Queries for Mere MortalsMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access Applications(Paris, France)
On Mar 7, 2017, at 10:13 AM, 'qingqinga@yahoo.com' qingqinga@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Duane-It could be DLookup. But DLookup doesn't work either, maybe there's something wrong with "'"? The reason that I didn't join the tblMenuList is because there's no fields to be joined. I appended form names from MSysObjects to "tblMenuList". And I use this list to assign form access to users.Best Regards,Kevin
Date: 2017-03-07 16:48Subject: Re: [MS_AccessPros] Query doesn't get expeced result
- The code for the function
- What results you actually see that we can't
- What should the results look like
- What have you done to test
- Provide the entire SQL view of the query
- Tell us why you are using ELookup() rather than joining on tblMenuList
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of 'qingqinga@yahoo.com' qingqinga@yahoo.com[MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Tuesday, March 7, 2017 2:33 AM
To: MS_Access_Professionals
Subject: [MS_AccessPros] Query doesn't get expeced result
Dear All-The query below doesn't get the expeced result. Please help! Thanks in advance.
MenuListID: ELookup("MenuListID","tblMenuList","MenuListFrm='" & [EmployeeMenuFrm] & "'"),
[EmployeeMenuFrm] is a string.
Best Regards,Kevin
__._,_.___
Posted by: John Viescas <johnv@msn.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