J
jhunter
=====
ISSUE
=====
My supplier changed their part#'s from numeric to alphanumeric (I'm now
getting a "type mismatch" on intID1 and intID2 which are setup as data
type LONG).
How can I do this with the new alphanumeric part#'s?
NOTE: The part# is the only UNIQUE field for the table.
==========
BACKGROUND
==========
O/S = Win2k Pro
Patches Installed
Software = Access 2000
Patches Installed
======
LEGEND
======
++++ = Where it fails
====
CODE
====
Public Function fWEBpr______EXPORTtoHTML()
' W R I T E S P R O D U C T S T O H T M L
' Written by Jeff
' Edited 4/1/2003
Debug.Print "=F U N C T I O N (fWEBpr______EXPORTtoHTML)"
'Variables
Dim db As Database
Dim rs As Recordset
Dim intID1 As Long
Dim intID2 As Long
Dim strID As String
Dim strDetails As String
Dim FileNum As Long
Dim strDQ As String 'Double Quote
strDQ = """"
FileNum = FreeFile
Set db = CurrentDb()
Set rs = db.OpenRecordset("qryWEBpr______HTML")
'Do While Loop
Do While Not rs.EOF
FileNum = FreeFile
intID1 = rs!ItemID '++++ THIS IS WHERE IT FAILS ++++
strID = rs!ItemID
intID2 = intID1
'Start writing to file
Open "\\a\store\pr-" & strID & ".html" For Output As FileNum
'Beginning of HTML
Print #FileNum, "<!DOCTYPE...>
'The rest of the HTML is here
Print #FileNum, "</BODY></HTML>"
Close FileNum
rs.MoveNext
Loop
End Function
=========
Thanks!!!
THE END
=========
ISSUE
=====
My supplier changed their part#'s from numeric to alphanumeric (I'm now
getting a "type mismatch" on intID1 and intID2 which are setup as data
type LONG).
How can I do this with the new alphanumeric part#'s?
NOTE: The part# is the only UNIQUE field for the table.
==========
BACKGROUND
==========
O/S = Win2k Pro
Patches Installed
Software = Access 2000
Patches Installed
======
LEGEND
======
++++ = Where it fails
====
CODE
====
Public Function fWEBpr______EXPORTtoHTML()
' W R I T E S P R O D U C T S T O H T M L
' Written by Jeff
' Edited 4/1/2003
Debug.Print "=F U N C T I O N (fWEBpr______EXPORTtoHTML)"
'Variables
Dim db As Database
Dim rs As Recordset
Dim intID1 As Long
Dim intID2 As Long
Dim strID As String
Dim strDetails As String
Dim FileNum As Long
Dim strDQ As String 'Double Quote
strDQ = """"
FileNum = FreeFile
Set db = CurrentDb()
Set rs = db.OpenRecordset("qryWEBpr______HTML")
'Do While Loop
Do While Not rs.EOF
FileNum = FreeFile
intID1 = rs!ItemID '++++ THIS IS WHERE IT FAILS ++++
strID = rs!ItemID
intID2 = intID1
'Start writing to file
Open "\\a\store\pr-" & strID & ".html" For Output As FileNum
'Beginning of HTML
Print #FileNum, "<!DOCTYPE...>
'The rest of the HTML is here
Print #FileNum, "</BODY></HTML>"
Close FileNum
rs.MoveNext
Loop
End Function
=========
Thanks!!!
THE END
=========