Need help...appreciated greatly!!!!

  • Thread starter Thread starter TDawg471
  • Start date Start date
T

TDawg471

Guest
Hello everyone. I am not skilled with Microsoft Access, but it is essential that I am able to correct and complete the following code. A co-worker has a large number of photos on diskette, and wishes to have a program on Access that will sort those onto a database. He has part of the code written, but areas of it need work. PLEASE HELP, it would mean a lot. There are some small details that need to be changed, but the main problem is how to add lines of code into an existing program. How would I do that? Here is the code so far:

Form_frmAPICheckList - 1

` Insert all the Answers into the tblAPI653CheckListResults database
Set dbs = CurrentDb
` Set search criteria
Set rst = dbs.OpenRecordset ("tblAPI653CheckListResults", dbOpenTable)
For I = 1 to ***HELP! A VARIABLE FOR THE NUMBER OF FILES ON DISKETTE!**
With rst
.AddNew ` Add new record
!InspectionID = strTankSerialNumber
!APIQuestionID = I **HELP! HE NEEDS TO INSERT "PhotoSerNo" INSTEAD OF "APIQuestionID"**
!Results = strAPIresults (I) **LOCATION**
(The following two lines need to be inserted...)
!ID **(OLE FIELD TYPE?)**
!Photo = "ADMFC-522.JPG (ex.)"
.Update `Save changes
End With
Next I

rst.Close
Set dbs = Nothing
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

THANKS!!!!! I HOPE YOU KNOW WHAT I'M TALKING ABOUT
 
Here is the first part of you code :

Form_frmAPICheckList - 1

` Insert all the Answers into the tblAPI653CheckListResults database
Set dbs = CurrentDb
` Set search criteria
Set rst = dbs.OpenRecordset ("tblAPI653CheckListResults", dbOpenTable)
'************************************************************************
For I = 1 to rst.RecordCount ' this must be the number of records in the table "tblAPI653CheckListResults" AKA -files on the diskette
' a built in variable

'***HELP! A VARIABLE FOR THE NUMBER OF FILES ON DISKETTE!**
'***********************************************************************

Marty H.

Martin H. Habicht & Associates
176 Knudson Drive, Kanata, Ontario, K2K 2C6 CANADA
Tel: 613-592-6982
E-mail: martyh@home.com
 
oops !! forgot
Just before the for statement, put in :

rst.movelast

I'll see about the rest ! Can't promise though!!
Marty
 

Users who are viewing this thread

Back
Top Bottom