Active Employees/Inactive Employees

desireemm

Registered User.
Local time
Today, 14:12
Joined
Dec 30, 2003
Messages
64
New Project please help

I have a database that has several tables in it, all of which are about employees that we license (gaming license) we have their active files and inactive files. The database has a 11 tables the reason for this is to track their licensing status, theres license revocations, license suspensions, license denials (for new hire employees) and terminations (employee terms doesnt necessarily apply to licensing). Then theres Active employees (note all these employees get Team Member #'s which identifies them in the database) the ative employees tables consist of New Hires (application number) Upgrades, Active employees, Government employees. Now all these tables use to be in different databases, now I have decided to combine them in one database, just trying to find a way to get a form to show each table when selected through a list box in a form. What we are trying to do is create one database and attach some scanners to it so when we scan documents (Personal docs) for records it will show the physical folder version (documents) as well as the data in the fields. Trying to go paperless.
 
I do something similar with a combo box to list all of my tables and then change
the forms record source in the combo boxes after update event.

All of my tables that I want to list have a prefix "tbl". Here is what the row source [SQL ]
for the combo box looks like...

SELECT MSysObjects.Name, MSysObjects.Type
FROM MSysObjects
WHERE (((MSysObjects.Name) Like "tbl*") AND ((MSysObjects.Type)=1))
ORDER BY MSysObjects.Name;

Here is the code I use my combo box [cbSelectTable] after update event...
Code:
Private Sub cbSelectTable_AfterUpdate()
On Error GoTo Err_cbSelectTable_AfterUpdate
    
    Beep
    If MsgBox("Do you want to change the form's record source to the ''" & cbSelectTable & "'' table?", vbQuestion + vbYesNo, "Change Record Source") = vbYes Then
        Form.RecordSource = cbSelectTable
    Else
        Beep
        MsgBox "The form's record source was not changed.", vbInformation
    End If
    
Exit_cbSelectTable_AfterUpdate:
    Exit Sub
    
Err_cbSelectTable_AfterUpdate:
    MsgBox "Run-time error # " & Err.Number & "." & vbCrLf & vbLf & Err.Description
    Resume Exit_cbSelectTable_AfterUpdate
    
End Sub
HTH
 
thats great

what if I wanted to have a list box with the names of the different tables in it and as soon as you select that table you would get the form associated with it, of which you could look up an employees team member number and their data.
 

Users who are viewing this thread

Back
Top Bottom