Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-access > #11029
| From | "Phil" <phil@stantonfamily.co.uk> |
|---|---|
| Newsgroups | comp.databases.ms-access |
| Subject | Re: help with array code |
| Date | 2015-08-22 00:32 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mr8cfa$4oa$1@speranza.aioe.org> (permalink) |
| References | <d5b1f243-9498-41cb-bb56-7874e18b3043@googlegroups.com> <fb7a68d1-48f1-4ec7-a2af-d65c36cd8123@googlegroups.com> <4dd6f70e-b002-482f-aacc-0986b27fbc25@googlegroups.com> <93412c70-2237-422c-921b-b35c37ff3556@googlegroups.com> |
>
> How is your value stored in rst!Priority? As a string? Won't work. As a
> number? What kind of number is that? Boolean? not just 1s and 0s. How the
> hell do you expect Array() to work? By the power of prayer?
>
> Why don't you stop your code (use STOP) and step thru the code. See what
> your Ubound and Lbound values are.
>
> Why can't you use Split()? Why does it not fit what you are trying to do.
> Up to this point, all I see is you not succeeding.
>
>
Air code
Dim i as integer, j as integer
dim a as string
dim MyDb as database
Dim Myset as recordset
set mydb = current db
set Myset = Mdb.OpenRecordset(MTable)
With MySet
do until.eof
for i = 1 to len(!Priority)
a = mid(Priority,i,1)
if a = "1" then is it a "1"
if mid(!Priority) = "," or mid(!Priority) = vbcrlf then ' is the next symbol
a comma or end of record Debug i
for j = i step -1
if mid (!Priority) = "," then 'count any preceding commas
i = i -1
next j
debug i ' THis should be the corret position
exit for
next i
movenext
loop
close
set myset = nothing
end with
Phil
Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
help with array code bobh <vulcaned@yahoo.com> - 2015-08-20 08:43 -0700
Re: help with array code Ulrich Möller <knobbi38@arcor.de> - 2015-08-20 19:40 +0200
Re: help with array code Ulrich Möller <knobbi38@arcor.de> - 2015-08-21 11:39 +0200
Re: help with array code Patrick Finucane <patrickfinucanetx@gmail.com> - 2015-08-20 10:53 -0700
Re: help with array code bobh <vulcaned@yahoo.com> - 2015-08-21 06:16 -0700
Re: help with array code Patrick Finucane <patrickfinucanetx@gmail.com> - 2015-08-21 10:37 -0700
Re: help with array code "Phil" <phil@stantonfamily.co.uk> - 2015-08-22 00:32 +0100
Re: help with array code "Phil" <phil@stantonfamily.co.uk> - 2015-08-22 10:08 +0100
Re: help with array code bobh <vulcaned@yahoo.com> - 2015-08-24 07:53 -0700
Re: help with array code Patrick Finucane <patrickfinucanetx@gmail.com> - 2015-08-24 09:38 -0700
csiph-web