S
Steve Mahon
I've upsized the tables successfully to SQL 2000. Now I'm getting errors
3219 and 3251. I am inexperienced with programming, but think I have figured
out that the operations the code is doing are different for odbc versus
imbedded table (jet?) I'll paste one of the functions at the end of this
message, and would really appreciate suggestions for revising the code or
links to related articles. Thanks, Steve
Function GetTableInformation(ParmTable, parmID, parmOption)
Dim db As Database, tblGeneric As Table
Set db = CurrentDb()
Select Case ParmTable
Case "Component"
Set tblGeneric = db.OpenTable("Component")
tblGeneric.Index = "PrimaryKey"
tblGeneric.Seek "=", parmID
If (tblGeneric.NoMatch = False) Then
Select Case parmOption
Case "Description"
GetTableInformation = tblGeneric("Description")
Case "Category"
GetTableInformation = tblGeneric("Category")
Case "Group"
GetTableInformation = tblGeneric("Group")
End Select
End If
Case "Product"
Set tblGeneric = db.OpenTable("Product")
tblGeneric.Index = "PrimaryKey"
tblGeneric.Seek "=", parmID
If (tblGeneric.NoMatch = False) Then
Select Case parmOption
Case "Description"
GetTableInformation = tblGeneric("Description")
Case "Default Lock"
GetTableInformation = tblGeneric("Default Lock")
Case Else
MsgBox "Error in (GetTableInformation)"
End Select
End If
End Select
End Function
3219 and 3251. I am inexperienced with programming, but think I have figured
out that the operations the code is doing are different for odbc versus
imbedded table (jet?) I'll paste one of the functions at the end of this
message, and would really appreciate suggestions for revising the code or
links to related articles. Thanks, Steve
Function GetTableInformation(ParmTable, parmID, parmOption)
Dim db As Database, tblGeneric As Table
Set db = CurrentDb()
Select Case ParmTable
Case "Component"
Set tblGeneric = db.OpenTable("Component")
tblGeneric.Index = "PrimaryKey"
tblGeneric.Seek "=", parmID
If (tblGeneric.NoMatch = False) Then
Select Case parmOption
Case "Description"
GetTableInformation = tblGeneric("Description")
Case "Category"
GetTableInformation = tblGeneric("Category")
Case "Group"
GetTableInformation = tblGeneric("Group")
End Select
End If
Case "Product"
Set tblGeneric = db.OpenTable("Product")
tblGeneric.Index = "PrimaryKey"
tblGeneric.Seek "=", parmID
If (tblGeneric.NoMatch = False) Then
Select Case parmOption
Case "Description"
GetTableInformation = tblGeneric("Description")
Case "Default Lock"
GetTableInformation = tblGeneric("Default Lock")
Case Else
MsgBox "Error in (GetTableInformation)"
End Select
End If
End Select
End Function