Here is the code:
Public Sub setTableName(tblType As String, frmName As String)
Dim rsTBL As DAO.Recordset
Set rsTBL = CurrentDb.OpenRecordset("tblTableConfig", dbOpenDynaset)
With rsTBL
.MoveFirst
.FindFirst "[FormsName] = '" & frmName & "'"
If Not .NoMatch Then
Select Case tblType
Case tblType = "WorkOrder"
mstrWOTable = !WorkOrderTable
Case tblType = "MasterNumber"
mstrMNTable = !MasterNumberTable
Case tblType = "Employee"
mstrEMPTable = !EmployeeTable
End Select
Else
MsgBox "not working"
End If
End With
End Sub
Any thoughts?
MistyWolf
Public Sub setTableName(tblType As String, frmName As String)
Dim rsTBL As DAO.Recordset
Set rsTBL = CurrentDb.OpenRecordset("tblTableConfig", dbOpenDynaset)
With rsTBL
.MoveFirst
.FindFirst "[FormsName] = '" & frmName & "'"
If Not .NoMatch Then
Select Case tblType
Case tblType = "WorkOrder"
mstrWOTable = !WorkOrderTable
Case tblType = "MasterNumber"
mstrMNTable = !MasterNumberTable
Case tblType = "Employee"
mstrEMPTable = !EmployeeTable
End Select
Else
MsgBox "not working"
End If
End With
End Sub
Any thoughts?
MistyWolf