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

EVALUATE THE CONTENTS OF DATABASE FIELDS & THEN WRITE STATEMENTS 1

Status
Not open for further replies.

TNN

Programmer
Sep 13, 2000
417
US
Need help with a starting point.

I have numerous records in a databse table that I must evaluate each field in a record of approx 50 fields and then write an appropriate vb statement. 40 of the fields contain either Y for yes or N for no. Depending on the field I must then adjust or modify a calculation to include or exclude certain calculable items. How do I bring forward each field, evaluate it, and write a statement.

Select Case won't work because I will have more than one matching case to write statements for. Each field evaluation may or may not require a vb statement to adjust calculations.

Any suggestions including the use of SQL are appreciated.

TNN, Tom
TNPAYROLL@AOL.COM


TOM
 
At least for me, this is where SQL becomes inappropiate, except as the recordsource for the module/function.

I would code this in a module, using the recordset "du jour".

A simple loop through the record set

At each record, a set/series of statements based on the fields performs the calculation for the record, outputs the results to your selected destiniation.

This approach allows the processing of the individual field contents in any order you choose and allows you to step through the calculations for debugging purposes.



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top