Question About Cycling Through .mdb's

Feb 15, 2006

I have a project that contains about 200 very small .mdb's. For reasons that make no sense, I have to keep all these little .mdb's separate.

What I'm interested in doing is to run a query against a table in each of the .mdb's and if I find a certain record in the table within each .mdb, have a record written that contains the name of the .mdb in which the record was found . In other words, cycle through all my .mdb's, check my specified table, write my notification record, and then repeat the process for the next .mdb.

Can this be done? Does anyone have an idea or suggestion? I know I can do this separately, but that would be a pain.

If anyone can offer assistance, I would be most appreciative. Thanks!

View Replies


ADVERTISEMENT

Cycling Itemselected On A Listbox

Apr 10, 2008

Hi All,

I have the following code that Cycles through a listbox that has columns associated to it:

Dim db As DAO.Database

Set db = CurrentDb

lstOrigin.SetFocus
For i = 0 To lstOrigin.ItemsSelected.Count - 1
txtAmount.SetFocus
For x = 1 To CInt(txtAmount.Text)
strsql = "insert into tmpJob select dbo_jtJob.* from dbo_jtJob where jtJobId = " & lstOrigin.Column(0)
db.Execute strsql
Next
Next

This code works fine and so if I multi-select the lstOrigin.Column(0) value changes correctly as expected..

I now have a second listbox also set with columns and set for multiselect:

The code I have for this is :

Dim i As Integer
Dim strCriteria As String

strCriteria = "key in ("
lstDestination.SetFocus
For i = 0 To lstDestination.ItemsSelected.Count - 1
strCriteria = strCriteria & lstDestination.Column(0) & ", "
Next
strCriteria = Left(strCriteria, Len(strCriteria) - 2) & ")"
DoCmd.OpenForm "JobCreateTemplate", , , strCriteria, , acDialog

Now in this one lstDestination.Column(0) always equals the last item in the items selected index. It iterates the loop the correct number of times. I cannot see what I've done different that the process works in the first lot of code and not the second.

This is Access 2003

View 1 Replies View Related

Trigger A Function When Cycling Records

Aug 10, 2005

hello i wish to trigger some VBA code when the user jumps from the present record to some other record on the form. there is the On Current event but that only applies to the record you are jumping to. i wish to process the information on the present record if u choose to jump to some other. BTW my form my form only shows one record at a time.
Please help me out here. :confused:

View 3 Replies View Related

Cycling Thru Record In A Query In Code

Jun 12, 2005

I'm trying to set up a looping code to go thru each record in a query. I know in excel I would set the cell value to a range and offset to get to the next value. How is this done in Access?

View 1 Replies View Related

Reports :: Print Report Cycling Through List Box

Jul 10, 2014

I have a form with a list box, which lists all those registered for a student orientation. I then have a button to an unbound report which prints a registration worksheet. This report looks up the student's name, test scores, suggested courses based on those scores, and various other information from multiple tables, assigns them to variables, then to controls on the report. This is done in the On Open event of the report.

But it was designed to work for record highlighted. Which was fine until now. Now I'd like to take it one step further and have it go through the list from beginning to end, printing the report for each record in the list.

Maybe I am missing something simple, but I can't seem to pull it off. The closest I can get is getting it to print the first record n times.

View 10 Replies View Related

General :: Identify Cycling / Fluctuations In A Time Series Data?

Mar 12, 2013

I am trying to find an algorithm to identify patterns in my data.

My task is to accomplish whether the data shows a very sharp decline and whether or not it follows previous fluctuation.

If it declines sharply and doesn't follow previous fluctuations it will indicate a production problem.

My time series data is as follows.Also sharp decline according to the below data is highlighted.

Data
-0.027663709
-0.057051957
-0.077941988
-0.070009989
-0.033860193

[code]....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved