Re: LOOP WITHIN A LOOP

Tech-Archive recommends: Speed Up your PC by fixing your registry




"SEAN DI''''ANNO" <SEANDIANNO@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:4EA1A5F4-A18C-4DFB-9091-EE545903A7B4@xxxxxxxxxxxxxxxx
> Thanks guys, I think I understand what you mean
>
> Outer loop - Loop through record 1 to end of records
> Inner loop - Loop through each field within the record
>
> I will explain why I want to do this.
>
> I am writing a database to monitor the accuracy of new data
entered. (It is
> exported into access and not input) I have to give each record a
data score
> depending on accurate the data is. The only way I can think to do
this is to
> loop the fields and then using the value of the field name and the
value
> entered for the field, look up any SHOULD NOT USE VALUES stored in
another
> table using a DLOOKUP function (I think...ha ha)
>
> How do I know the name of the field that the loop is on. Is it
> rs.fields.value?
>
> "Chris2" wrote:

Sean,

I am not sure why this operation cannot be accomplished with one
UPDATE statement.

The narratives given so far present no compelling reason to use VBA
that I can see.

It is difficult to tell, though, as I am not sure what your schema
is, or what your source data and desired results are.


Although meant for an sqlserver newsgroup, the
following link is still applicable for MS Access:
http://www.aspfaq.com/etiquette.asp?id=5006, and
is excellent when it comes to detailing how to
provide the information that will best enable
others to answer your questions.


Pure Guesswork:

UPDATE DataEntryScores AS DS1
INNER JOIN
DataEntry DE1
ON DS1.pk = DE1.pk
SET DS1.col1 = <your accuracy check on DE1.col1>
,DS1.col2 = <your accuracy check on DE1.col2>
,DS1.col3 = <your accuracy check on DE1.col3>
,etc.
,etc.
,etc.

Or possibly the SET will look like:

SET DS1.col1 = <your accuracy check on all DE1 columns>


Sincerely,

Chris O.


.



Relevant Pages

  • Re: LEN_TRIM performance issue
    ... to be in the inner loop. ... control parameters are stored as strings in a derived type. ... A long time ago in a Fortran 66 execution profiler ...
    (comp.lang.fortran)
  • Re: LEN_TRIM performance issue
    ... to be in the inner loop. ... time scales in the problem. ... control parameters are stored as strings in a derived type. ...
    (comp.lang.fortran)
  • Re: LEN_TRIM performance issue
    ... to be in the inner loop. ... control parameters are stored as strings in a derived type. ... before doing a compare operation, you might not need to use LEN_TRIM ...
    (comp.lang.fortran)
  • Re: xreadlines() being used with file.tell() and file.seek()
    ... seekand xreadlines do seem to work together: ... > inner loop in conjunction with "file.telland file.seekin order to ... > #outer loop using file.readline ...
    (comp.lang.python)
  • Re: How do you cast to array?
    ... empty comparison loop before the optimiser notices and removes it altogether. ... creating a 0-sized array was around 25 nanoseconds. ... array creation from the inner loop, then the /rest/ of the inner loop must be ... I can't see that the cost of creating objects can be called anything ...
    (comp.lang.java.programmer)