Khalid-
Since you are including the CollectionVoucher table in that query, why not simply add the NameOfClient field to the list of columns? I gather what you want is the client name that was associated at the time the CollectionVoucher was created, even if the client changes later.
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 28, 2017, at 10:11 PM, khalidtanweerburrah@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
John,
I think obviously the next step would be to change After Update Event of cmbConsignmentNo, which is at present:
Private Sub cmbConsignmentNo_AfterUpdate()
Me.cmbClientCIN.RowSource = "SELECT DISTINCT Clients.ClientCIN, Clients.ClientName, Consignee.ConsigneeName " & _
"FROM Consignee INNER JOIN (Clients INNER JOIN CollectionVoucher " & _
"ON Clients.ClientCIN = CollectionVoucher.ClientCIN) " & _
"ON Consignee.ConsigneeName = Clients.CosigneeName " & _
"WHERE CollectionVoucher.ConsignmentNo = '" & Nz(Me.cmbConsignmentNo, "") & _
"' ORDER BY Clients.ClientCIN"
End Sub
Or you will guide and suggest what to do next.
Regards,
Khalid
---In MS_Access_Professionals@yahoogroups.com, <khalidtanweerburrah@...> wrote :
John,
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Please give me some time. I have changed a lot of code while trying myself. Let me revert back.
Yes your suggestion now show in Dialog Box, ConsignmentNo and NameOfClient. This gives me hope that further we can get the required results.
I'll be back sooner.
Thanks for your answer and help.
Regards,
Khalid
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Khalid-
Change the Row Source of cmbConsignmentNo to:
You can get to the new data by referencing Me.cmbConsignmentNo.Column(1)
Does that help?
John Viescas, author
---In MS_Access_Professionals@yahoogroups.com, <khalidtanweerburrah@...> wrote :
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
---In MS_Access_Professionals@yahoogroups.com, <khalidtanweerburrah@...> wrote :
__._,_.___
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 (5) |
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