A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combining freeform-entry and linked data into a single view



 
 
Thread Tools Display Modes
  #11  
Old July 29th, 2009, 05:26 PM posted to microsoft.public.access.tablesdbdesign
Dale_Fye via AccessMonster.com
external usenet poster
 
Posts: 128
Default Combining freeform-entry and linked data into a single view

This technique should still work, as long as either tShipping.fCustomerID or
tShipping.fGeneralShipToID has a value

Dale

JohnM77 wrote:
Dale,

The tShipping.fCustomerID field will not necessarily contain a value. There
are often instances where items are shipped with no relation to an
Order/Customer.

-John

John,

[quoted text clipped - 26 lines]
Thanks,
John


--
HTH

Dale Fye

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200907/1

  #12  
Old July 29th, 2009, 05:43 PM posted to microsoft.public.access.tablesdbdesign
JohnM77 via AccessMonster.com
external usenet poster
 
Posts: 17
Default Combining freeform-entry and linked data into a single view

Dale,

I tested your query method with the NZ function, and it's exactly what I'm
looking for. It even shows Shipping records where both tShipping.fCustomerID
AND tShipping.fGeneralShipToID are Null, which may be a possibility. Would
you not expect those records to show up in the result?

Thanks a million!

-John

Dale_Fye wrote:
This technique should still work, as long as either tShipping.fCustomerID or
tShipping.fGeneralShipToID has a value

Dale

Dale,

[quoted text clipped - 9 lines]
Thanks,
John



--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200907/1

  #13  
Old July 29th, 2009, 07:35 PM posted to microsoft.public.access.tablesdbdesign
JohnM77 via AccessMonster.com
external usenet poster
 
Posts: 17
Default Combining freeform-entry and linked data into a single view

Dale,

Taking your method one step further, how would I go about selecting
additional fields from the tGeneralShipTo or tCustomers tables, corresponding
to the Non-Null ID field in tShipping (tShipping.fCustomerID or tShipping.
fGeneralShipToID)? For instance, if in a given record in tShipping the
fGeneralShipToID field contains a value, how would I cause other fields from
tGeneralShipTo table (such as City, State, Zip) to also show up in the query?

Thanks,
John

JohnM77 wrote:
Dale,

I tested your query method with the NZ function, and it's exactly what I'm
looking for. It even shows Shipping records where both tShipping.fCustomerID
AND tShipping.fGeneralShipToID are Null, which may be a possibility. Would
you not expect those records to show up in the result?

Thanks a million!

-John

This technique should still work, as long as either tShipping.fCustomerID or
tShipping.fGeneralShipToID has a value

[quoted text clipped - 6 lines]
Thanks,
John


--
Message posted via http://www.accessmonster.com

  #14  
Old July 29th, 2009, 08:16 PM posted to microsoft.public.access.tablesdbdesign
Dale Fye
external usenet poster
 
Posts: 2,651
Default Combining freeform-entry and linked data into a single view

John,

Yes, I would expect it to show the ShipIDs for those where there is no match
for either CustomerID or GeneralShipToID. To expand for additional fields
from the appropriate table, just keep using the NZ( ) function.

Try something like:

SELECT tS.ShippingID,
NZ([tGST].[Address], [tC].[Address]) AS ShipAddress,
NZ([tGST].[City], [tC].[City]) AS ShipCity,
NZ([tGST].[State], [tC].[State]) AS ShipState,
NZ([tGST].[Zip], [tC].[Zip]) AS ShipZip
FROM (tShipping as TS
LEFT JOIN tCustomers as tC
ON tS.CustomerID = tC.CustomerID)
LEFT JOIN tGeneralShipTo as tGST
ON tS.GeneralShipToID = tGST.GeneralShipToID;

----
HTH
Dale



"JohnM77 via AccessMonster.com" wrote:

Dale,

Taking your method one step further, how would I go about selecting
additional fields from the tGeneralShipTo or tCustomers tables, corresponding
to the Non-Null ID field in tShipping (tShipping.fCustomerID or tShipping.
fGeneralShipToID)? For instance, if in a given record in tShipping the
fGeneralShipToID field contains a value, how would I cause other fields from
tGeneralShipTo table (such as City, State, Zip) to also show up in the query?

Thanks,
John

JohnM77 wrote:
Dale,

I tested your query method with the NZ function, and it's exactly what I'm
looking for. It even shows Shipping records where both tShipping.fCustomerID
AND tShipping.fGeneralShipToID are Null, which may be a possibility. Would
you not expect those records to show up in the result?

Thanks a million!

-John

This technique should still work, as long as either tShipping.fCustomerID or
tShipping.fGeneralShipToID has a value

[quoted text clipped - 6 lines]
Thanks,
John


--
Message posted via http://www.accessmonster.com


  #15  
Old July 29th, 2009, 08:32 PM posted to microsoft.public.access.tablesdbdesign
JohnM77 via AccessMonster.com
external usenet poster
 
Posts: 17
Default Combining freeform-entry and linked data into a single view

Dale, you're a genius. It is now a complete solution to the problem. Thanks
for your time. You've been an enormous help.

Best regards,
John

Dale Fye wrote:
John,

Yes, I would expect it to show the ShipIDs for those where there is no match
for either CustomerID or GeneralShipToID. To expand for additional fields
from the appropriate table, just keep using the NZ( ) function.

Try something like:

SELECT tS.ShippingID,
NZ([tGST].[Address], [tC].[Address]) AS ShipAddress,
NZ([tGST].[City], [tC].[City]) AS ShipCity,
NZ([tGST].[State], [tC].[State]) AS ShipState,
NZ([tGST].[Zip], [tC].[Zip]) AS ShipZip
FROM (tShipping as TS
LEFT JOIN tCustomers as tC
ON tS.CustomerID = tC.CustomerID)
LEFT JOIN tGeneralShipTo as tGST
ON tS.GeneralShipToID = tGST.GeneralShipToID;

----
HTH
Dale

Dale,

[quoted text clipped - 24 lines]
Thanks,
John


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200907/1

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.