0

Hi guys..
I'm using MS ACCESS for my dbase..
i have a tblborrow where you can find transac_num ..now, i have in my form a label which here, you can see how many transactions you have done already(i'll name it sa lbltransacno) and a save button..
what i want now is that.. every time the user save a transaction.. the lbltransacno will automatically go to its next number.. but of course.. the user should fill up the information needed.. if those are not filled up, and he click the save button.. the transaction will not be counted..
how to code it??

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by hericles
0

Select MAX(transac_num) FROM tblborrow will get you the highest value currently stored in that column so you might want to get that and display it in your label.
I'm not sure if Access has the @@identity function the same as some other sql databases do.
You would need to get the max value of the column each time a user saves data to avoid concurrency issues involved with two people using the software at the same time (rather than automatically increment the label value in your code).
To know if the fields have been populated use required field validators or do some custom code yourself to check the textboxes aren't empty.
Hope that helps,

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.