Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set default field values in a Make Table query?

Status
Not open for further replies.

jbradley

Programmer
Joined
Sep 7, 2001
Messages
248
Location
US
I inherited an Access 2000 database that contains a Make Table query. The resulting table contains two fields, Debit and Credit of type Currency that need to have a default value of 0 but instead have no default value. I can make the data value of rows created by the query 0 but subsequent rows added later don't contain anything (are Null). Is there any way to specify what the default value property of these two fields should be?

Code:
[b]SELECT tblItemCodes.[JournalEntry]
, First(tblItemCodes.GLAccountNumber) AS FirstOfGLAccountNumber
, Sum(IIf([AMOUNT]<0,[AMOUNT]*(-1),0)) AS Debit
, Sum(IIf([AMOUNT]>0,[AMOUNT],0)) AS Credit
, First(qryCCBpre_6189.processdate) AS FirstOfProcessDate
, First(tblItemCodes.Settled) AS FirstOfSettled 
INTO tblCCBGLReport_6189
FROM (qryCCBpre_6189 INNER JOIN tblItemCodes ON qryCCBpre_6189.[item-code] = tblItemCodes.ItemCode) INNER JOIN tblCCBSettlementAccountNos ON tblItemCodes.ItemCode = tblCCBSettlementAccountNos.[Item Code]
GROUP BY tblItemCodes.[JournalEntry]
HAVING (((First(tblItemCodes.Settled))=True));
[/b]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top