Employees showing up as numbers

  • Thread starter Thread starter idtjes3
  • Start date Start date
I

idtjes3

Hello,
Im trying to create a time card form using the ms access template business>
time card. Ive seemingliy copied all the data from the template and applied
it to my format however, when I click on my employee time card ( form or
table) and try to select my employee's name it only lists the employee's
number in the combo box. I built a query ( like the template did) to combine
the employee's first and last names then i copied the code in the sql editor
from the templates query to the one i created to suit my setup. The code is
as follows:
SELECT
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[LastName]
& ", " & [FirstName])) AS [File As],
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[FirstName]
& " " & [LastName])) AS EmployeeName, [Employee Data].*
FROM [Employee Data]
ORDER BY
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[LastName]
& ", " & [FirstName])),
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[FirstName] & " " & [LastName]));

That all appeared to be correct as my query now looked like the template.
Then, i went to my Employee time Cards and under EmployeeName i have data
type number ( like the template) and in the sql editor i entered:
SELECT [Employee Filed data].EmployeeID, [Employee Filed data].EmployeeName
FROM [Employee Filed data];

Once that was setup I created a relation ship from The Employee Data
Table>EmployeeID to Employee Time Cards.EmployeeName ( as did the template i
followed). It linked it correctly but as i stated above, its listing the
employee numbers rather than full names. What did i miss? If you need more
info let me know, ill try and help the best I can.
 
It sounds as though you have all of the data elements correct, you just need
to tweak the format elements of the combo box.

Take a look at the Number of Columns, and the Column Widths and verify that
these are correct. Chances are that your problem derives from one (or both)
of these settings.

Even if you are only wanting one column to display--the column with employee
names--the combo box will still be at least two columns wide. The other
column must account for the bound EmployeeID field.

So, using the information you have provided, I would have you set the number
of columns to 2, and set the width of the first column to 0", and the second
to however long you need to display the data. The 0" in the first column
hides that column so that all you see are the elements in the second column.

Good luck.
Jeff
 
HOORAY ! Ive been trying to fix this since last friday. Thank you so much
Curis that fixed it.

Curis said:
It sounds as though you have all of the data elements correct, you just need
to tweak the format elements of the combo box.

Take a look at the Number of Columns, and the Column Widths and verify that
these are correct. Chances are that your problem derives from one (or both)
of these settings.

Even if you are only wanting one column to display--the column with employee
names--the combo box will still be at least two columns wide. The other
column must account for the bound EmployeeID field.

So, using the information you have provided, I would have you set the number
of columns to 2, and set the width of the first column to 0", and the second
to however long you need to display the data. The 0" in the first column
hides that column so that all you see are the elements in the second column.

Good luck.
Jeff

idtjes3 said:
Hello,
Im trying to create a time card form using the ms access template business>
time card. Ive seemingliy copied all the data from the template and applied
it to my format however, when I click on my employee time card ( form or
table) and try to select my employee's name it only lists the employee's
number in the combo box. I built a query ( like the template did) to combine
the employee's first and last names then i copied the code in the sql editor
from the templates query to the one i created to suit my setup. The code is
as follows:
SELECT
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[LastName]
& ", " & [FirstName])) AS [File As],
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[FirstName]
& " " & [LastName])) AS EmployeeName, [Employee Data].*
FROM [Employee Data]
ORDER BY
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[LastName]
& ", " & [FirstName])),
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[FirstName] & " " & [LastName]));

That all appeared to be correct as my query now looked like the template.
Then, i went to my Employee time Cards and under EmployeeName i have data
type number ( like the template) and in the sql editor i entered:
SELECT [Employee Filed data].EmployeeID, [Employee Filed data].EmployeeName
FROM [Employee Filed data];

Once that was setup I created a relation ship from The Employee Data
Table>EmployeeID to Employee Time Cards.EmployeeName ( as did the template i
followed). It linked it correctly but as i stated above, its listing the
employee numbers rather than full names. What did i miss? If you need more
info let me know, ill try and help the best I can.
 
So glad I could help! You are very welcome.

Jeff


idtjes3 said:
HOORAY ! Ive been trying to fix this since last friday. Thank you so much
Curis that fixed it.

Curis said:
It sounds as though you have all of the data elements correct, you just need
to tweak the format elements of the combo box.

Take a look at the Number of Columns, and the Column Widths and verify that
these are correct. Chances are that your problem derives from one (or both)
of these settings.

Even if you are only wanting one column to display--the column with employee
names--the combo box will still be at least two columns wide. The other
column must account for the bound EmployeeID field.

So, using the information you have provided, I would have you set the number
of columns to 2, and set the width of the first column to 0", and the second
to however long you need to display the data. The 0" in the first column
hides that column so that all you see are the elements in the second column.

Good luck.
Jeff

idtjes3 said:
Hello,
Im trying to create a time card form using the ms access template business>
time card. Ive seemingliy copied all the data from the template and applied
it to my format however, when I click on my employee time card ( form or
table) and try to select my employee's name it only lists the employee's
number in the combo box. I built a query ( like the template did) to combine
the employee's first and last names then i copied the code in the sql editor
from the templates query to the one i created to suit my setup. The code is
as follows:
SELECT
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[LastName]
& ", " & [FirstName])) AS [File As],
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[FirstName]
& " " & [LastName])) AS EmployeeName, [Employee Data].*
FROM [Employee Data]
ORDER BY
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[LastName]
& ", " & [FirstName])),
IIf(IsNull([LastName]),IIf(IsNull([FirstName]),[EmployeeID],[FirstName]),IIf(IsNull([FirstName]),[LastName],[FirstName] & " " & [LastName]));

That all appeared to be correct as my query now looked like the template.
Then, i went to my Employee time Cards and under EmployeeName i have data
type number ( like the template) and in the sql editor i entered:
SELECT [Employee Filed data].EmployeeID, [Employee Filed data].EmployeeName
FROM [Employee Filed data];

Once that was setup I created a relation ship from The Employee Data
Table>EmployeeID to Employee Time Cards.EmployeeName ( as did the template i
followed). It linked it correctly but as i stated above, its listing the
employee numbers rather than full names. What did i miss? If you need more
info let me know, ill try and help the best I can.
 
Back
Top