arrays in Access

ravikode

New Member
Joined
Oct 10, 2003
Messages
27
Hi,
I have a table which has around 10000 rows. I want to access each row at a time and do some validations. Is there a concept of cursor(like in oracle and sybase) in Access2002. I need an example for that.

Thanks
Ravi
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
ok, I've never really used arrays, so there' probably another way; what I do for record-by-record validation is to use VBA to grab a DAO or ADO recordset and then loop through this recordset, performing your validation procedures on every loop:

Code:
Public Function fValidate_Recordset()
Dim db as DAO.Database
Dim rs as DAO.Recordset
Set db=CurrentDB
Set rs=db.OpenRecordset("SELECT * FROM YOUR_TABLE")
'You now have a DAO Recordset that you can manipulate
'Loop through it and perform some actions
Do While Not RS.EOF
If RS!Validation_Field=Something Then
  'Perform An Action 
  RS.MoveNext
Else
  'Perform Another Action
  RS.MoveNext
End If
Loop
Set rs=Nothing
Set db=nothing
End Function
I don't know your VBA experience; if you want to try taking this route, describe what specifically you're trying to do and maybe we can help more.
 
Upvote 0

Forum statistics

Threads
1,221,621
Messages
6,160,879
Members
451,675
Latest member
Parlapalli

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top