473,395 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

reading entries in a recordset and performing tasks if something found

Hi,

have a record set consisting of 1 field.
Possible entries are 1, 2, 3, 4.1, 4.2, 4.3, 5.1, 5.2, 6.1, 6.2, 7, 8,
9, null
Goal is to read the RS and as it finds certain numbers that it prints a
cooresponding file, then moves on to the next until EOF.

Have tried a few things and still do not have a solution.

pretty sure I need 'do while not EOF' and 'loop', but trying to keep it
simple. My problem might be in setting and reading the variable.

I would greatly appreciate some air code to play with. Once completed I
will post the complete procedure for others to play with.

Help I am lost!

for reference, here is my sqlcode to pull the recordset.

SELECT Art_UN.Label_1 FROM TMP_pack INNER JOIN Art_UN ON
TMP_pack.UN_Typ = Art_UN.UN GROUP BY Art_UN.label_1;

Jan 17 '07 #1
2 1189
Still playing, got to this
How can I read the entry? It is correctly telling me I cannot edit, but
there is no 'read' or 'view'
What else can I try?

While Not rs_adr.EOF
With rs_adr
.edit
adrklasse = rs_adr!label_1
If adrklasse = 3 Then
Call fprintpdf("s:\labens\db\pdf\kl_3.pdf", WINMAX)
ElseIf adrklasse = 4.1 Then
Call fprintpdf("s:\labens\db\pdf\kl_41.pdf", WINMAX)
End If
.Update
End With
Wend

Jan 17 '07 #2
"stevenrec" <st***********@stevenrec.comwrote in
news:11*********************@v45g2000cwv.googlegro ups.com:
Still playing, got to this
How can I read the entry? It is correctly telling me I cannot edit, but
there is no 'read' or 'view'
What else can I try?

While Not rs_adr.EOF
With rs_adr
.edit
adrklasse = rs_adr!label_1
If adrklasse = 3 Then
Call fprintpdf("s:\labens\db\pdf\kl_3.pdf", WINMAX)
ElseIf adrklasse = 4.1 Then
Call fprintpdf("s:\labens\db\pdf\kl_41.pdf", WINMAX)
End If
.Update
End With
Wend

If you are just reading values you don't have to edit or update.

Very Air Code written while talking on telephone; probably has syntax
errors:

Dim Path$
Path = "s:\labens\db\pdf\kl_Identifier.pdf"
With rs_adr
While Not .EOF
fprintpdf Replace(Path,"Identifier", Replace(CStr(.Fields
("label_1").Value),".","")), WINMAX
' The above is all one line)
.MoveNext
Wend
End With
Jan 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: dmiller23462 | last post by:
My brain is nuked....Can anybody tell me right off the bat what is wrong with this code? Along with any glaring errors, please let me know the syntax to display a message (Response.Write would be...
1
by: Boris Wilhelms | last post by:
Hello all, at first, sorry for my bad English, I’ll give my best  We have a strange problem reading Text- and VarChar-Fields. Our configuration: -Windows 2003 Server -MySQL Server 3.23.36...
8
by: zorro | last post by:
I need to read the entire eventlog and parse it. The application uses vb.net and the EventLog object. The problem i'm having is that it can take less then a second up to 15 seconds to read all...
2
by: Roland Hall | last post by:
I have two(2) issues. I'm experiencing a little difficulty and having to resort to a work around. I already found one bug, although stated the bug was only in ODBC, which I'm not using. It...
1
by: Aravind | last post by:
Hi folks. I have 2 tables, AccList and Book. Book has ISBN as its primary key, while AccList has AccNo as its primary key (data type = Autonumber) and ISBN as its foreign key. The entries...
10
by: nick_faye | last post by:
Hi guys, i'm still a newbie in using MS Access and in VB programming. I am using DAO connection from my VB to access the entries on my MS Access table. I am having trouble in editting and...
3
by: timb | last post by:
Hi, I have created a windows service which is responsible for running certain tasks when they are scheduled to run. The service monitors a sql table and runs a task when the task scheduled time...
1
by: Andrew | last post by:
Hi, im trying to create a small function which can create a binary tree from the entries in a text file and after that we can perform all the usual operations like search, insert and delete etc....
4
by: =?Utf-8?B?R3JlZw==?= | last post by:
My background is in MS Access and I am in the process of migrating my skillsets to Visual Basic.Net. So far I am able to display data in DataGridViews and Combo Box, etc with not problem. What I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.