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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ledger Forms

Status
Not open for further replies.

Bigsteve42

Technical User
Nov 12, 2002
13
GB
I need to develop a form that processes journal entry transactions. The subform contains two columns debits & credits but both these columns should only write to a field called nt_amount in the table. I have based the form on a query and given nt_amount the aliases of debit & credit. However when I key a value in debit the same value appears in credit & vice versa. How can I develop the form so the figures appear on either debit or credit not both?

Thanks
 
hi there,

I'm not sure if this is the best solution but you could base the debit and credit controls (textboxes) control source on an expression: e.g.

(I assume you want one of your controls to display if nt_amount is positive and the other to display if nt_amount is negative)


=iif([nt_amount]>=0,abs([nt_amount]),Null)

and

=iif([nt_amount]<0,abs([nt_amount]),Null)

Then, on the enter event of these two controls, have a hidden unbound textbox appear over top of the control, populate it with the correct data, set its dimensions to the same as the underlying control, set focus to it, and use it for data entry. On the unbound textboxes Exit event, you then update the nt_amount field of the forms recordset, and hide the unbound textbox. So, to the user, it will just appear as if they had entered data into your credit/debit controls directly.

Does this make any sense...?

Cheers,
Dan



 
Dan

Thanks for that will give that a go. Do you know where I can get samples of databases that have been developed for ledgers e.g Nominal Ledger, Sales Ledger etc?

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top