473,387 Members | 1,528 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,387 software developers and data experts.

Saving Last TransactionID in another table

PMB
Thank you in advance for any and all assistance.

I'm trying to keep my numbers for transactions sequential. I clear my
monthly transactions each month and store them in a general transactions
table. My problem is, everytime I clear the table, it wants to start back at
Zero, which conflicts with records that are already created.

Is there a way to create a second table and store the value of the last
transaction and pull it into the transactions for the new month?

I've tried psuedo code of; (neither field is AutoNumber)

If IsNull(TransactionID) Then
TransactionID = DMax("tblNewNumber", "TransactionID")+1
Else
TransactionID = DMax("tblTransactionsNew", "TransactionID")+1
End If

But, it doesn't work all the time. HELP

Michael
Nov 12 '05 #1
1 1337
PMB
Also, how can I save the last transaction into the new table so that the
transactionID's are sequential?

Michael
"PMB" <pm*****@megavision.com> wrote in message
news:oQ*****************@news.uswest.net...
Thank you in advance for any and all assistance.

I'm trying to keep my numbers for transactions sequential. I clear my
monthly transactions each month and store them in a general transactions
table. My problem is, everytime I clear the table, it wants to start back at Zero, which conflicts with records that are already created.

Is there a way to create a second table and store the value of the last
transaction and pull it into the transactions for the new month?

I've tried psuedo code of; (neither field is AutoNumber)

If IsNull(TransactionID) Then
TransactionID = DMax("tblNewNumber", "TransactionID")+1
Else
TransactionID = DMax("tblTransactionsNew", "TransactionID")+1
End If

But, it doesn't work all the time. HELP

Michael

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: PMB | last post by:
Thank you in advance for any and all assistance. I'm trying to keep my numbers for transactions sequential. I clear my monthly transactions each month and store them in a general transactions...
13
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've...
3
by: RCS | last post by:
I have an app that I have different "sections" that I want to switch back and forth from, all while having the server maintain viewstate for each page. In other words, when I am on Page1.aspx and...
7
by: Gav | last post by:
If you had a class user with variables id, name, password. How would you save this object or its variable date to a MySQL database? And then if you had a dbase populated with id, name, password and...
6
by: Robm | last post by:
Since googling this issue only brings up the April fool's problem, which was solved years ago, I hope that somebody can help me with this. I have a large vc++/mfc application which needs to know...
5
by: deekay | last post by:
I want to allow users to resize and reposition columns of a datasheet but for a prompt to be brought up and only the layout only to be saved if they select "save changes". This is the way it works...
5
by: wideasleep | last post by:
Hi Everyone, I have a design issue here (go figure) on a form and kind of need some opinions on how to do this. I have my ideas but need a 2nd, 3rd, 4th.......opinions. 1st I will have a combo...
3
by: bluethunder | last post by:
Good morning guys, I have a problem regarding the usage of the command button in VB 6. I dont know what codes what i will gonna use. How will i gonna call the records from the table using command...
1
by: AdamOnAccess | last post by:
I'm in Access 2007. I built a feature that to saves the current list in a sub form to a separate table. It works like this: After entering a list of words in the subform, the user can choose to push...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.