473,386 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Struggling to create a opening balance

3
Hi Everyone
I am very new to access.Can someone help me.I am trying to create a form with a daily Opening balance using sql.My tbl looks like this below.I willbe very grateful.

Date Opening Balance Withdrawal Deposit Balance
2008/10/01 73100 23400 0 49700
2008/10/02 49700 13800 90000 125900
Oct 15 '08 #1
2 2496
Krandor
50
You weren't very clear as to what you wanted but I'll give it a try.

If you want the amount of the opening balance for today, then you will need something like this:

SELECT Opening_Balance FROM tbl_Savings WHERE Date = (SELECT Max(Date) FROM tbl_Savings)

That will give you the most current balance.

By the way, I think date may be a reserved word. If so it may give you trouble in your coding. It is generally not a good idea to have field names have anything close to reserved names.
Oct 15 '08 #2
eeze
3
You weren't very clear as to what you wanted but I'll give it a try.

If you want the amount of the opening balance for today, then you will need something like this:

SELECT Opening_Balance FROM tbl_Savings WHERE Date = (SELECT Max(Date) FROM tbl_Savings)

That will give you the most current balance.

By the way, I think date may be a reserved word. If so it may give you trouble in your coding. It is generally not a good idea to have field names have anything close to reserved names.
Hi Krandor
Firstly,many thanks on your response and suggestion.I am going to try this.I will let you know how it goes!
Oct 16 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Greg | last post by:
On my report I want to have an opening balance signifying all transactions up to the month selected and detailed transactions for the month selected and then a closing blance. I'm perpelexed...
2
by: Prakash | last post by:
I have 2 tables ... Customer_Master: Cust-Code, Cust_Name Customer_Transactions: Cust_Code, Date, Details, Debit, Credit I would like to generate a report in the foll manner, say from...
160
by: RG | last post by:
Greetings friends, This semester I have started a course in C programming. I was moving along fine until I reached to the topic of loops (feeling embarrassed among you elite programmers). My...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
2
by: moyoal | last post by:
Hi, Can anyone help me how to get current opening balance from the table AR_PAYMENT_SCHEDULES any replies will be highly appreciate.... Regards, moyoal
3
by: Paul H | last post by:
I have a transactions table and a balance table that look something like this: tblTransactions TransactionID (PK Autonumber) ClientID TransactionDate TransactionAmount (currency field, values...
1
by: eeze | last post by:
Hi Everyone I am very new to access.Can someone help me.I am trying to create a form with a daily Opening balance using sql.My tbl looks like this below.I willbe very grateful. Date ...
1
maxx233
by: maxx233 | last post by:
I need to figure out a way to generate a report to find customers in our DB that have unused credits on their account so we can void them out periodically - we manually assign them credits, they make...
1
by: darendaren88 | last post by:
I have created this table: mysql> describe acount; +----------+---------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra |...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.