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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Format Field in Make Table Query



 
 
Thread Tools Display Modes
  #1  
Old February 16th, 2007, 02:07 PM posted to microsoft.public.access.queries
Claudette Hennessy
external usenet poster
 
Posts: 43
Default Format Field in Make Table Query

I know field formats are not inherited in a Make Table Query. Here is the
query.
SELECT DISTINCT tblDealer.DealerFirstName, tblDealer.DealerLastName,
tblDealer.Address, tblDealer.HomeTown, tblDealer.HomeState,
tblDealer.HomeZip, Date() AS [Date Mailed], Date() AS [Contract Received]
INTO tblCurrentContractList
FROM (tblDealer INNER JOIN tblEvent ON tblDealer.ShopID = tblEvent.ShopID)
INNER JOIN tblShow ON tblEvent.ShowID = tblShow.ShowID
WHERE (((tblShow.EndShowDate)[In Shows after date input]))
ORDER BY tblDealer.DealerLastName;

At present I have the Contract Received field set to Date() to type it as a
date.
I want it to be typed as date/time but null so the client can type in the
date later. Is there some elegant way to do this?


  #2  
Old February 16th, 2007, 02:28 PM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default Format Field in Make Table Query

In general, the best approach is to set up the table exactly as you want it,
and then populate it with an Append query instead of the Make Table.

If that doesn't suit, you can try this:
IIf(False, #1/1/2000#, Null)
The False part is never true, so it will never insert the date, but in some
cases that's enough to give JET the clue as to what data type you intend.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Claudette Hennessy" wrote in message
...
I know field formats are not inherited in a Make Table Query. Here is the
query.
SELECT DISTINCT tblDealer.DealerFirstName, tblDealer.DealerLastName,
tblDealer.Address, tblDealer.HomeTown, tblDealer.HomeState,
tblDealer.HomeZip, Date() AS [Date Mailed], Date() AS [Contract Received]
INTO tblCurrentContractList
FROM (tblDealer INNER JOIN tblEvent ON tblDealer.ShopID = tblEvent.ShopID)
INNER JOIN tblShow ON tblEvent.ShowID = tblShow.ShowID
WHERE (((tblShow.EndShowDate)[In Shows after date input]))
ORDER BY tblDealer.DealerLastName;

At present I have the Contract Received field set to Date() to type it as
a date.
I want it to be typed as date/time but null so the client can type in the
date later. Is there some elegant way to do this?


  #3  
Old February 16th, 2007, 06:01 PM posted to microsoft.public.access.queries
Claudette Hennessy
external usenet poster
 
Posts: 43
Default Format Field in Make Table Query

That works just right, the field is date/time in the table and the value is
null. thank you,
Claudette
"Allen Browne" wrote in message
...
In general, the best approach is to set up the table exactly as you want
it, and then populate it with an Append query instead of the Make Table.

If that doesn't suit, you can try this:
IIf(False, #1/1/2000#, Null)
The False part is never true, so it will never insert the date, but in
some cases that's enough to give JET the clue as to what data type you
intend.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Claudette Hennessy" wrote in message
...
I know field formats are not inherited in a Make Table Query. Here is
the query.
SELECT DISTINCT tblDealer.DealerFirstName, tblDealer.DealerLastName,
tblDealer.Address, tblDealer.HomeTown, tblDealer.HomeState,
tblDealer.HomeZip, Date() AS [Date Mailed], Date() AS [Contract Received]
INTO tblCurrentContractList
FROM (tblDealer INNER JOIN tblEvent ON tblDealer.ShopID =
tblEvent.ShopID) INNER JOIN tblShow ON tblEvent.ShowID = tblShow.ShowID
WHERE (((tblShow.EndShowDate)[In Shows after date input]))
ORDER BY tblDealer.DealerLastName;

At present I have the Contract Received field set to Date() to type it
as a date.
I want it to be typed as date/time but null so the client can type in the
date later. Is there some elegant way to do this?




 




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 09:04 AM.


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