RE: runtime error record is deleted
- From: trevi <trevi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Jan 2007 23:05:00 -0800
I want to split the fields to store in a table.
They dont seem that difficult. But maybe I'm doing it wrong. One of the
fields I have contains city , state and zip together in one cell (Excel).
I have corresponding fields, city,state and zip in my table. I am passing
the field to a function that splits the fields into an array :
dim array() as variant
array = split(inputfield,",")
rs.fields("city") = array(0)
rs.fields("state") = array(1)
rs.fields("zip") = array(2)
what do you think?
"Duane Hookom" wrote:
Why don't you give us some sample values (find the difficult, weird ones) and.
tell us what you want to do with it? Do you have a field you want to store
this information in or do you want to split to display only?
--
Duane Hookom
Microsoft Access MVP
"trevi" wrote:
I have to convert some data from an xls spread***. Im calling a function I
created that takes in a field that contains city,state zip. In the function I
split them out into separate fields. I ran this and it tells me that the
"record is deleted". When I pull up the table, the first record has
"#deleted" in every field. I even went back into my function and tried to
only display a couple of fields, and I still get the same error.ll show the
query and the function ( how the recordset is opened). Maybe somebody can see
what I am doing wrong. Thanks in advance.
Query: SELECT splitname(flname,citystzip), first, last,
FROM ActiveApproach
Function:
Dim rs As ADODB.Recordset
Dim stzp() As String
arname = Split(name, ",")
lastname = arname(0)
firstname = arname(1)
Set rs = New ADODB.Recordset
rs.Open "activeapproach query", CurrentProject.connection, adOpenDynamic,
adLockOptimistic
rs.MoveFirst
MsgBox (rs.Fields("flname") & "name")
- Follow-Ups:
- RE: runtime error record is deleted
- From: Duane Hookom
- RE: runtime error record is deleted
- References:
- RE: runtime error record is deleted
- From: Duane Hookom
- RE: runtime error record is deleted
- Prev by Date: Re: Total Query
- Next by Date: RE: runtime error record is deleted
- Previous by thread: RE: runtime error record is deleted
- Next by thread: RE: runtime error record is deleted
- Index(es):
Loading