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

Help creating a loop update

Hi guys,

I am creating a transactional database for a payroll department. The database logs requests that come into the department from managers. As such I have a master log table which contains information such as when the request was recieved, who sent it etc. and a sub log table which records the details (each master request contains many pay related transactions for different employees).
Since the payroll department has periodic cut off times I'd like the database to be able to mark on each of the sub transactions if the request is retrospective (ie occured in a prior period). This is so we can measure the real extent of employee's not being paid correctly due to poor submission of requests.

I've set up the subform which contains the smaller transactions as a datasheet (so spreadsheet information can be pasted in). When the log has been completed I have an OK button which I'd like to attach a for...next function which evaluates the transaction start date (eg. 123 should have recieved a payrise 5 months ago) against the current period start date and mark a boolean field as true if it is retrospective.

The problem I am experiencing with this is referencing just the transaction numbers relating to that specific request. I can code it so it loops though the entire database but obviously it changes data from other transactions (making reporting impossible).

I think i need something like "for all log number x, if sublog number date < current period start date, mark as retrospective, next record until last" which is triggered by closing the log.

Any pointers in how to get my function working would be (very) gratefully appreciated. I'm sure I could accomplish the same using update queries but i'd like to keep the database as tidy as possible (with preference to code).

Thanks,

Dan
Sep 5 '08 #1
2 1278
Just an update - I've done it (at last! :D) so no need to reply.

Thanks,

Dan
Sep 6 '08 #2
NeoPa
32,556 Expert Mod 16PB
Well done Dan.

Sometimes just getting your thoughts together to put them down is enough to trigger an answer.

Welcome to Bytes!
Sep 6 '08 #3

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

Similar topics

1
by: Scott J. Chlebove | last post by:
I am running a PL/SQL module in which I do the following.... BEGIN DBMS_OUTPUT.enable(1000000); -- Open file for writing. OutfileHandler1 := UTL_FILE.FOPEN(wc_file_path, wc_output_file1,...
9
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
0
by: Sarah | last post by:
Hi, I have an Access database of about 1000 records. I am trying to use asp to loop through the record set one at a time, creating the html code for a web page. I would like to save the actual...
19
by: trint | last post by:
Ok, I start my thread job: Thread t = new Thread(new ThreadStart(invoicePrintingLongRunningCodeThread)); t.IsBackground = true; t.Start(); There are lots of calls to controls and many...
11
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
2
by: alxasa | last post by:
Hi, I have a setInterval which executes its command every 10 seconds in a infinite loop. I've got something real basic like: var processes=0; function startme(){ if(stopthisloop>1)
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
6
by: jenipriya | last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors... The table structures i hav Employee (EmpID,...
14
by: bcap | last post by:
Hello, I really would apprciate help! =) What I want to do is be able to change the status of mulitple records using a drop down and a checkbox. I have a drop down called "ChangeStatus"...
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
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?
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
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.