Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for starting point 2

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Joined
Jan 11, 2001
Messages
1,373
Location
US
Hello all, I am new to this particular forum.

I have an Access application that I wrote for keeping track of modifications for a software package we have here at work. It works great except that for every new version I spend an hour adding the new version to the program records. I would like to automate this. My problem is I don't know where to begin. I am looking either for a sample with reading in a loop, adding records, and reading records; or someone to help me get a start. I used to know VB descently, but that was a few years ago.

I would be greatly appreciative of anyone that could help me. Thanks! iSeriesCodePoet
IBM iSeries (AS/400) Programmer
[pc2]
 
here's a sample to reading/updating records w/ code:

dim db as database
dim myset as recordset

set db = currentdb()
set myset = db.openrecordset("your table/query here")

if myset.dob = true then exit sub

with myrecordset
if .recordcount then
.movefirst
do until recordset.eof
.edit
'!myfield = some garbage
.update
end if
end with

that flips through your records and lets you update current records.

you can add new ones with

.addnew
'!yourfield = value
.update

hope this helps Cruz'n and Booz'n always.
This post shows what little I do at work.
 
Thanks, this will give me a good start. I will post if I have any othere questions. iSeriesCodePoet
IBM iSeries (AS/400) Programmer
[pc2]
 
This line appears to be incorrect:
dim db as database

iSeriesCodePoet
IBM iSeries (AS/400) Programmer
[pc2]
 
Hi Klodark,

You will need to include a reference to the following library for this to work:

Microsoft DAO 3.6(Or whatever is the most current version you have) Object Library Regards,
gkprogrammer
 
How do I do that? iSeriesCodePoet
IBM iSeries (AS/400) Programmer
[pc2]
 
Not sure if you already got the answer but...Open the database. Open your module. At the top of your screen select TOOLS and then REFERENCES. Put a check next to Microsoft DAO 3.6. Click OK. Save Module.
 
star to rstitzel, learn something new everyday. Cruz'n and Booz'n always.
This post shows what little I do at work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top