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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parse postal address field into many 3

Status
Not open for further replies.

Joeclueless

Technical User
Jan 30, 2002
116
0
0
US
I have an address field named [STREET].

examples of values:

STREET
4103 SANTA ROSALIA DR #D
12763 DE HAVEN AV
2348 W 255TH ST
547 1/4 S BREED ST
1163 S HOOVER ST #1
1909 1/2 TALMADGE ST
4806 1/2 FIRESTONE BL
5544 YOLANDA AV #307
4859 1/4 N LONG BEACH AV WEST 27

I want to parse these values into a maximum of 7 fields.

[HSE_NBR] = house number (ex. 4859)
[HSE_FRAC_N] = house number fractional suffix (ex. 1/4)
[HSE_DIR_CD] = address direction (ex. N)
[STR_NM] = street name (ex. LONG BEACH)
[STR_SFX_CD] = street suffix/type (ex. AV)
[STR_SFX_DI] = street suffix direction (ex. WEST)
[UNIT_RANGE] = unit number (ex. 27)

Not all records have all 7 pieces of information. In fact, I don’t think any records have all 7. The example: "4859 1/4 N LONG BEACH AV WEST 27" is a hypothetical potential value.

I'm having some difficulty though.. I need to look at each StrIn and have the module "Decide" which output field to drop it into....

This is what I have so far... This has been modified from a post from a few years back by a GREAT INDIVIDUAL Tranman in:

thread701-244291

Code:
Option Compare Database

Public Function ParseFld()
Dim intPtr As Integer             'Pointer for location of multiple spaces in strIn variable
Dim intlen As Integer             'Variable to hold length of strIn variable
Dim strIn As String               'Common named variable for use as input field
Dim conDB As New adodb.Connection 'Connection to the current database
Dim rsIn As New adodb.Recordset   'Recordset to fetch unparsed input data from Input Recordset
Dim rsOut As New adodb.Recordset  'Recordset to insert parsed data into Output Recordset
Dim strSQLIn As String            'SQL string to query up input data
Dim strSQLOut As String           'SQL string to create recordset based upon structure of SampOutput

'Set up SQL statements
strSQLIn = "Select * from lausd_sis_fall04;"
strSQLOut = "Select * from hseno_01_test;"

'Now open the connection to the current database
conDB.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Data_Models\hsenum\Data_Parsing.mdb;Persist Security Info=False"

'Then, open up the two recordsets.
  'rsIn will contain all of the data from the lausd_sis_fall04 table
  'rsOut will contain all of the data from the hseno_01_test table (which is no data because we have
  'not added any yet, but rsOut will still contain a field for each column in hseno_01_test

rsIn.Open strSQLIn, conDB, adOpenDynamic, adLockOptimistic
rsOut.Open strSQLOut, conDB, adOpenDynamic, adLockOptimistic

'At this point, the rsIn recordset contains a snapshot of the entire lausd_sis_fall04 table, and we can
'move through the recordset, processing fields (columns), updating them if we wish, deleting
'rows, or whatever.  We are just going to move through the recordset from beginning to end,
'first, moving the LAUSD_ID from the rsIn recordset to the rsOut recordset, and thus to the
'hseno_01_test table, and then parsing out and moving the contents of STREET, one field
'at a time into rsOut, and thus to hseno_01_test.

'JoeC, you just need to accept this connection/recordset functionality and not worry too
'much about how it works.

'First, be sure we are pointed to the first row of rsIn
rsIn.MoveFirst

'Next, we delete all rows from hseno_01_test to make sure no artifacts were left there by a
'previous run
conDB.Execute "Delete from hseno_01_test;"


'Now, we process each row of the recordset, one at a time until we reach rsIn.EOF

Do While Not rsIn.EOF
  'Add a new (blank) row to hseno_01_test
  rsOut.AddNew
  
  'Move LAUSD_ID field from rsIn to rsOut (and thus to hseno_01_test)
  rsOut.Fields("LAUSD_ID") = rsIn.Fields("LAUSD_ID")
  
  'Move LAUSD_ID field from rsIn to rsOut (and thus to hseno_01_test)
  rsOut.Fields("ZIP_CD") = rsIn.Fields("ZIP")
  
  'Move unparsed field into strIn here. (We use strIn as a work area.)
  'Note: reference could be rsIn.Fields(1)
  strIn = rsIn.Fields("STREET")
  
  'Now, we start parsing the field
  strIn = Trim(strIn) 'get rid of any leading/trailing spaces
  
  'Now, we parse out the remainder of strIn (the variable-length part)
  
  'Here, we find the first occurance of a space in strIn
  intPtr = InStr(strIn, " ")
  
  'And then move all characters to the left of a space into the HSE_NBR field
  rsOut.Fields("HSE_NBR") = Left(strIn, intPtr - 1)
  
  'Then we strip the HSE_NBR data off of the front of strIn
  intlen = Len(strIn)
  strIn = Right(strIn, (intlen - intPtr) + 1)
  
  'Then we strip the leading space(s) off of strIn
  strIn = Trim(strIn)
    
  
  
  'Then we find the next occurance of a space
  'Are you beginning to see a pattern here?
  intPtr = InStr(strIn, " ")
  
  'Then we move all characters to the left of the multiple spaces into the HSE_FRAC_N field
  rsOut.Fields("HSE_FRAC_N") = Left(strIn, intPtr - 1)
  
  'Then we strip the HSE_FRAC_N data off of the front of strIn
  intlen = Len(strIn)
  strIn = Right(strIn, (intlen - intPtr) + 1)
    
  'Then we strip the leading space(s) off of strIn
  strIn = Trim(strIn)

  'Then we find the next occurance of a space
  intPtr = InStr(strIn, " ")
  
  'Then we move all characters to the left of the multiple spaces into the HSE_DIR_CD field
  rsOut.Fields("HSE_DIR_CD") = Left(strIn, intPtr - 1)
  
  'Then we strip the HSE_DIR_CD data off of the front of strIn
  intlen = Len(strIn)
  strIn = Right(strIn, (intlen - intPtr) + 1)
    
  'Then we strip the leading space(s) off of strIn
  strIn = Trim(strIn)

  'Then we find the next occurance of a space
  intPtr = InStr(strIn, " ")
  
  'Then we move all characters to the left of the multiple spaces into the STR_NM field
  rsOut.Fields("STR_NM") = Left(strIn, intPtr - 1)
  
  'Then we strip the STR_NM data off of the front of strIn
  intlen = Len(strIn)
  strIn = Right(strIn, (intlen - intPtr) + 1)
    
  'Then we strip the leading space(s) off of strIn
  strIn = Trim(strIn)

  'Then we find the next occurance of a space
  intPtr = InStr(strIn, " ")
  
  'Then we move all characters to the left of the multiple spaces into the STR_SFX_CD field
  rsOut.Fields("STR_SFX_CD") = Left(strIn, intPtr - 1)
  
  'Then we strip the STR_SFX_CD data off of the front of strIn
  intlen = Len(strIn)
  strIn = Right(strIn, (intlen - intPtr) + 1)
    
  'Then we strip the leading space(s) off of strIn
  strIn = Trim(strIn)
  
  'Then we find the next occurance of a space
  intPtr = InStr(strIn, " ")
  
  'Then we move all characters to the left of the multiple spaces into the STR_SFX_DI field
  rsOut.Fields("STR_SFX_DI") = Left(strIn, intPtr - 1)
  
  'Then we strip the STR_SFX_DI data off of the front of strIn
  intlen = Len(strIn)
  strIn = Right(strIn, (intlen - intPtr) + 1)
    
  'Then we strip the leading space(s) off of strIn
  strIn = Trim(strIn)
    
  'At this point, what is left in strIn is the data for the UNIT_RANGE field so we put it there
  rsOut.Fields("UNIT_RANGE") = strIn
      
  'Then we update the recordset (which inserts the recordset row into the table)
  rsOut.Update
      
  'Then we move forward to the next input row (this is like doing a read)
  rsIn.MoveNext
      
  'Then we loop back to the top and process the next row
Loop

'When we get here, we have processed all input rows.  Next we:

'Close the recordset objects
rsIn.Close
rsOut.Close

'Close the ADODB connection object
conDB.Close

'Release the objects' memory resources back to the system
Set rsIn = Nothing
Set rsOut = Nothing
Set conDB = Nothing

End Function


Anything helps!

Thanks again!

Joe
 
Yo Joe F.! Thanks for the compliment! I'm still around. Want to give her another whirl?
Tranman
 
Hey Paul!

How are you?
How did you find the posting with your handle in it?? Anyhow yeah, I do need some mentoring on this... It's actually been quite some time since I have even looked at anything this complex....

The code I posted above only works on the sample record that contains all 7 potential pieces of info... Otherwise I get:

Run-time error '5': invalid proceedure call or argument at:
rsOut.Fields("STR_SFX_CD") = Left(strIn, intPtr - 1)

if there are 5 pieces of info...
or at 3 pieces, the error is at:

rsOut.Fields("HSE_DIR_CD") = Left(strIn, intPtr - 1)
(the third field)

I think this is because in records other than the LONG BEACH AV WEST sample, there is no space to find when it gets to the end of the string? (See sample values at top of 1st post...)
or is that just crazy talk?

Thanks again!

Joe
 
I would use the Split() function to parse space-separated words, because it will populate an array in one line:
[tt]
Dim index As Long
Dim vWords As Variant

vWords = Split(Nz(rs![Field1], ""), " ")

For index = 0 To UBound(vWords)
Debug.Print vWords(index)
Next index
[/tt]


VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
To explain further, I would create a function to do the parsing, and have it populate a udt such as:
[tt]
Private Type AddressInfo
Number As String
Fraction As String
StreetDir As String
Street As String
Suffix As String
SuffixDir As String
SuffixNum As String
End Type
[/tt]

The function would look something like this:
Code:
Public Function ParseAddress(ByVal AddressString As Variant) As AddressInfo
  Dim index As Long
  Dim vWords As Variant
  Dim strThis As String
  Dim addInf As AddressInfo
  
  vWords = Split(Nz(AddressString, ""), " ")
  
  With addInf
    For index = 0 To UBound(vWords)
      strThis = vWords(index)
      If index = 0 And IsNumeric(strThis) Then
        .Number = strThis
        GoTo Continue
      ElseIf index = 1 And InStr(strThis, "/") > 0 Then
        .Fraction = strThis
        GoTo Continue
      End If
      If Eval("'" & UCase(strThis) & "' IN ('N','S','E','W')") And Len(.Street) = 0 Then
        .StreetDir = UCase(strThis)
      ElseIf index > 2 And Eval("'" & UCase(strThis) & "' IN ('NORTH','SOUTH','EAST','WEST')") Then
        .SuffixDir = UCase(strThis)
      ElseIf Eval("'" & UCase(strThis) & "' IN ('AV','LN','BL','CT','ST','RD','DR','HWY')") Then
        .Suffix = UCase(strThis)
      ElseIf index > 0 And index < UBound(vWords) Then
        .Street = Trim(.Street) & " " & strThis
      ElseIf index = UBound(vWords) And (Left(strThis, 1) = "#" Or IsNumeric(strThis)) Then
        .SuffixNum = strThis
      Else
        MsgBox strThis & " did not match any criteria.", vbExclamation
      End If
Continue:
    Next index
  End With
  
  ParseAddress = addInf

End Function

In your loop, you would have something like this:
Code:
  Dim addInf As AddressInfo

  <...>
While Not rs.EOF
  
  addInf = ParseAddress(rs![Address])
  
  With addInf
    If Len(.Number) > 0 Then
      [green]'add to address field[/green]
    End If
    If Len(.Fraction) > 0 Then
      [green]'add to fraction field[/green]
    End If
    If Len(.StreetDir) > 0 Then
      [green]'add to street direction field[/green]
    End If
    If Len(.Street) > 0 Then
      [green]'add to street field[/green]
    End If
    If Len(.Suffix) > 0 Then
      [green]'add to street suffix field[/green]
    End If
    If Len(.SuffixDir) > 0 Then
      [green]'add to suffix direction field[/green]
    End If
    If Len(.SuffixNum) > 0 Then
      [green]'add to suffix number field[/green]
    End If
  End With

  rs.MoveNext
Wend
  <...>

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Hey there Slammer...

I kinda get what you are doing here but I think I first need to make the udt (I assume this is User Defined Table?)

I think this is like a temporary storage medium? So these are not the field names of my final destination table?

So then, first of all, how would I define the udt?

Thanks again!

Joe
 
What I've tried is to put the Private Type into a new Module called DefineUdt

I ran that (No error, no anything, but I think it just sets up the udt)

Then I put the Parse Address Function into another new Module called ParseAddress.

When running this the error is:

"Compile Error: User-Defined type not defined" at:

Public Function ParseAddress(ByVal AddressString As Variant) As AddressInfo

Should the "AddressString" refer to the field STREET?

I get the same error if I put STREET there too... If I surround STREET with [] i.e. [STREET] then it's:
"Compile Error expected: indentifier"

On the Loop portion, I suppose it would go in the same module as the ParseAddress and set up the record sets and connections...

Am I anywhere close??







Thanks again!

Joe
 
Hi Joe,
Just saw your post, so went and looked at it.

You should put the udt(User-defined Type) definition in the same module as your code--just put it clear at the top (not in a sub or function--just put it right after the Option Explicit phrase). Alternatively, you can change it from a private type to a public type--I'd just move it.

AddressString is an argument being passed to the ParseAddress function by this command:

addInf = ParseAddress(rs![Address])

It represents the address field from your recordset.

Back to what I was writing...

Doing great here, guy. Things are fine here in Kansas--springtime, flowers, 75 degrees...Hope LA is treating you well.

Funny thing, I was on break yesterday afternoon, and just thought, what the heck, I'll go look out on Tek-Tips, and there, on top, was a post from you. Had to give you a holler.

VBslammer is right. Split IS a good thing to use in this case. I normally do it a bit differently to allow for cases where I have more than 1 space between words. Like so:
Code:
Private Sub Parser()
Dim strIn As String
Dim ary1() As String
Dim ary2() As String
Dim ndx1 As Integer
Dim ndx2 As Integer
strIn = "4103 SANTA   ROSALIA DR #D"
ary1 = Split(strIn)
For ndx1 = 0 To UBound(ary1)
  Select Case ary1(ndx1)
    Case ""
    Case Else
      ReDim Preserve ary2(ndx2)
      ary2(ndx2) = ary1(ndx1)
      ndx2 = ndx2 + 1
  End Select
Next
End Sub

When this code runs, you will end up with ary2 containing the exact number of elements that you have words in your address. (No "" elements due to multiple spaces.)

I don't personally like UDT's very well myself. They remind me of the old qbasic days, but to each his own. :)
So I usually just code a bunch of string variables, and concatenate them with spaces between when I'm done.

Let me know how it's going.

Paul
 
I used [Address] instead of [STREET], but the idea is the same:
Code:
Do While Not rsIn.EOF
  rsOut.AddNew
  rsOut.Fields("LAUSD_ID") = rsIn.Fields("LAUSD_ID")
  rsOut.Fields("ZIP_CD") = rsIn.Fields("ZIP")

  addInf = ParseAddress(rsIn![STREET])
  
  With addInf
    If Len(.Number) > 0 Then
      rsOut.Fields("HSE_NBR") = .Number
    End If
    If Len(.Fraction) > 0 Then
      rsOut.Fields("HSE_FRAC_N") = .Fraction
    End If
    If Len(.StreetDir) > 0 Then
      rsOut.Fields("HSE_DIR_CD") = .StreetDir
    End If
    If Len(.Street) > 0 Then
      rsOut.Fields("STR_NM") = .Street
    End If
    If Len(.Suffix) > 0 Then
      rsOut.Fields("STR_SFX_CD") = .Suffix
    End If
    If Len(.SuffixDir) > 0 Then
      rsOut.Fields("STR_SFX_DI") = .SuffixDir
    End If
    If Len(.SuffixNum) > 0 Then
      rsOut.Fields("UNIT_RANGE") = .SuffixNum
    End If
  End With

  rsOut.Update()
  rsIn.MoveNext
Loop

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Thanks Folks!

I have tried to piece these parts together and I am getting another error....

Code:
Option Compare Database

Private Type AddressInfo
  Number As String
  Fraction As String
  StreetDir As String
  Street As String
  Suffix As String
  SuffixDir As String
  SuffixNum As String
End Type

Public Function ParseAddress(ByVal AddressString As Variant) As AddressInfo

  Dim index As Long
  Dim vWords As Variant
  Dim strThis As String
  Dim addInf As AddressInfo

  vWords = Split(Nz(AddressString, ""), " ")
  
  With addInf
    For index = 0 To UBound(vWords)
      strThis = vWords(index)
      If index = 0 And IsNumeric(strThis) Then
        .Number = strThis
        GoTo Continue
      ElseIf index = 1 And InStr(strThis, "/") > 0 Then
        .Fraction = strThis
        GoTo Continue
      End If
      If Eval("'" & UCase(strThis) & "' IN ('N','S','E','W')") And Len(.Street) = 0 Then
        .StreetDir = UCase(strThis)
      ElseIf index > 2 And Eval("'" & UCase(strThis) & "' IN ('NORTH','SOUTH','EAST','WEST')") Then
        .SuffixDir = UCase(strThis)
      ElseIf Eval("'" & UCase(strThis) & "' IN ('AV','LN','BL','CT','ST','RD','DR','HWY')") Then
        .Suffix = UCase(strThis)
      ElseIf index > 0 And index < UBound(vWords) Then
        .Street = Trim(.Street) & " " & strThis
      ElseIf index = UBound(vWords) And (Left(strThis, 1) = "#" Or IsNumeric(strThis)) Then
        .SuffixNum = strThis
      Else
        MsgBox strThis & " did not match any criteria.", vbExclamation
      End If
Continue:
    Next index
  End With
  
  ParseAddress = addInf

End Function

Public Function Update()

Do While Not rsIn.EOF
  rsOut.AddNew
  rsOut.Fields("LAUSD_ID") = rsIn.Fields("LAUSD_ID")
  rsOut.Fields("ZIP_CD") = rsIn.Fields("ZIP")
  rsOut.Fields("CITY") = rsIn.Fields("CITY")
  
  addInf = ParseAddress(rsIn![Street])
  
  With addInf
    If Len(.Number) > 0 Then
      rsOut.Fields("HSE_NBR") = .Number
    End If
    If Len(.Fraction) > 0 Then
      rsOut.Fields("HSE_FRAC_N") = .Fraction
    End If
    If Len(.StreetDir) > 0 Then
      rsOut.Fields("HSE_DIR_CD") = .StreetDir
    End If
    If Len(.Street) > 0 Then
      rsOut.Fields("STR_NM") = .Street
    End If
    If Len(.Suffix) > 0 Then
      rsOut.Fields("STR_SFX_CD") = .Suffix
    End If
    If Len(.SuffixDir) > 0 Then
      rsOut.Fields("STR_SFX_DI") = .SuffixDir
    End If
    If Len(.SuffixNum) > 0 Then
      rsOut.Fields("UNIT_RANGE") = .SuffixNum
    End If
  End With

  rsOut.Update()
  rsIn.MoveNext
Loop

End Function




Sub ParseAddMacro()

End Sub

I put all of what seemed to go together and spliced.... I get an error:

"Only public user defined types defined in public object modules can be used as parameters or return types for public procedures of class modules or as fields of public user defined types"

I must be missing something... Do each of these need to be seperate? I have all of this in one module, with one macro named....

Does this make any sense?

Thanks again!

Joe
 
The looping section I posted was just a replacement for the loop you already had in your function:

Code:
Public Function ParseFld()
Dim intPtr As Integer             'Pointer for location of multiple spaces in strIn variable
Dim intlen As Integer             'Variable to hold length of strIn variable
Dim strIn As String               'Common named variable for use as input field
Dim conDB As New adodb.Connection 'Connection to the current database
Dim rsIn As New adodb.Recordset   'Recordset to fetch unparsed input data from Input Recordset
Dim rsOut As New adodb.Recordset  'Recordset to insert parsed data into Output Recordset
Dim strSQLIn As String            'SQL string to query up input data
Dim strSQLOut As String           'SQL string to create recordset based upon structure of SampOutput

'Set up SQL statements
strSQLIn = "Select * from lausd_sis_fall04;"
strSQLOut = "Select * from hseno_01_test;"

'Now open the connection to the current database
conDB.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Data_Models\hsenum\Data_Parsing.mdb;Persist Security Info=False"

'Then, open up the two recordsets.
  'rsIn will contain all of the data from the lausd_sis_fall04 table
  'rsOut will contain all of the data from the hseno_01_test table (which is no data because we have
  'not added any yet, but rsOut will still contain a field for each column in hseno_01_test

rsIn.Open strSQLIn, conDB, adOpenDynamic, adLockOptimistic
rsOut.Open strSQLOut, conDB, adOpenDynamic, adLockOptimistic

'At this point, the rsIn recordset contains a snapshot of the entire lausd_sis_fall04 table, and we can
'move through the recordset, processing fields (columns), updating them if we wish, deleting
'rows, or whatever.  We are just going to move through the recordset from beginning to end,
'first, moving the LAUSD_ID from the rsIn recordset to the rsOut recordset, and thus to the
'hseno_01_test table, and then parsing out and moving the contents of STREET, one field
'at a time into rsOut, and thus to hseno_01_test.

'JoeC, you just need to accept this connection/recordset functionality and not worry too
'much about how it works.

'First, be sure we are pointed to the first row of rsIn
rsIn.MoveFirst

'Next, we delete all rows from hseno_01_test to make sure no artifacts were left there by a
'previous run
conDB.Execute "Delete from hseno_01_test;"


'Now, we process each row of the recordset, one at a time until we reach rsIn.EOF
[blue]
Do While Not rsIn.EOF
  rsOut.AddNew
  rsOut.Fields("LAUSD_ID") = rsIn.Fields("LAUSD_ID")
  rsOut.Fields("ZIP_CD") = rsIn.Fields("ZIP")

  addInf = ParseAddress(rsIn![STREET])
  
  With addInf
    If Len(.Number) > 0 Then
      rsOut.Fields("HSE_NBR") = .Number
    End If
    If Len(.Fraction) > 0 Then
      rsOut.Fields("HSE_FRAC_N") = .Fraction
    End If
    If Len(.StreetDir) > 0 Then
      rsOut.Fields("HSE_DIR_CD") = .StreetDir
    End If
    If Len(.Street) > 0 Then
      rsOut.Fields("STR_NM") = .Street
    End If
    If Len(.Suffix) > 0 Then
      rsOut.Fields("STR_SFX_CD") = .Suffix
    End If
    If Len(.SuffixDir) > 0 Then
      rsOut.Fields("STR_SFX_DI") = .SuffixDir
    End If
    If Len(.SuffixNum) > 0 Then
      rsOut.Fields("UNIT_RANGE") = .SuffixNum
    End If
  End With

  rsOut.Update()
  rsIn.MoveNext
Loop
[/blue]
'When we get here, we have processed all input rows.  Next we:

'Close the recordset objects
rsIn.Close
rsOut.Close

'Close the ADODB connection object
conDB.Close

'Release the objects' memory resources back to the system
Set rsIn = Nothing
Set rsOut = Nothing
Set conDB = Nothing

End Function


VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Have you tried to replace this:
Private Type AddressInfo
By this ?
Public Type AddressInfo

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi,

I see. But the issue now is that there is a syntax error at:

rsOut.Update()

Any Idea?



Thanks again!

Joe
 
And this ?
rsOut.Update

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PHV,

I was trying that when you posted

rsOut.Update

Now I have an unspecified error.

Run-time error '-2147467259 (80004005)':
Unspecified error

And the Line:

conDB.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Data_Models\hsenum\Parse_Test.mdb;Persist Security Info=False"

is highlighted.

Hmmn.....

Thanks again!

Joe
 
Why not using this instead ?
Set conDB = CurrentProject.Connection

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks for that....

Now I have an error that states it can't open any more tables.

the highlighted line is:

rsIn.Open strSQLIn, conDB, adOpenDynamic, adLockOptimistic

Help is appreciated....

Thanks again!

Joe
 
Why would I get an error about the number of tables being opened? I only have 3 tables in the whole DB and am only working with 2 of them??

See previous post.........

Thanks again!

Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top