![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, I have a series of tables with two fields, LA and IndicatorValue. I have a recordset that selects this data from one table at a time and orders it by IndicatorValue (ascending). Using the RecordCount property, I have calculated how many records are in the table and stored this as a variable (then used it to update a summary table). I now need to be able to look down the table and store the record number where the LA = "Peterborough". Looking mannually, I can see for the first table Peterborough is in record 68 - how can I get the VBA code to look through the table and store this record number as a variable? I basically need to know that Peterborough is record X out of Y - and I know the result for Y already. I have experimented with absolute position but cant get this to do what I need ... does anyone have any ideas please? Many thanks |
#3
| |||
| |||
|
|
Hi All, I have a series of tables with two fields, LA and IndicatorValue. I have a recordset that selects this data from one table at a time and orders it by IndicatorValue (ascending). Using the RecordCount property, I have calculated how many records are in the table and stored this as a variable (then used it to update a summary table). I now need to be able to look down the table and store the record number where the LA = "Peterborough". Looking mannually, I can see for the first table Peterborough is in record 68 - how can I get the VBA code to look through the table and store this record number as a variable? I basically need to know that Peterborough is record X out of Y - and I know the result for Y already. I have experimented with absolute position but cant get this to do what I need ... does anyone have any ideas please? |
#4
| |||
| |||
|
|
Hi All, I have a series of tables with two fields, LA and IndicatorValue. I have a recordset that selects this data from one table at a time and orders it by IndicatorValue (ascending). Using the RecordCount property, I have calculated how many records are in the table and stored this as a variable (then used it to update a summary table). I now need to be able to look down the table and store the record number where the LA = "Peterborough". Looking mannually, I can see for the first table Peterborough is in record 68 - how can I get the VBA code to look through the table and store this record number as a variable? I basically need to know that Peterborough is record X out of Y - and I know the result for Y already. I have experimented with absolute position but cant get this to do what I need ... does anyone have any ideas please? Many thanks |
#5
| |||
| |||
|
|
If you have used an Autonumber as record ID, don't feel that is the equivalent of Record Number, even though it may appear so, because it may NOT always be a monotonically increasing value; but, its intent is to provide a unique id value for a record, so might be what you need to use instead of "record number". |
![]() |
| Thread Tools | |
| Display Modes | |
| |