Report From Form

M

m stroup

frmEmployeeEntry writes to tblEmployees.
btnUpdate changes tblBillets.status to "filled" and does a few other chores.
rptForEmail is based on rptForQuery with the following SQL

SELECT tblEmployees.EmployeeID, [FirstName] & " " & [LastName] AS Name,
tblEmployees.FirstName, tblEmployees.LastName, tblEmployees.Type,
tblEmployees.Country, tblEmployees.StartDt, tblEmployees.EndDt,
tblEmployees.Building, tblEmployees.Room, tblEmployees.Cubicle,
tblEmployees.WorkPhone, tblEmployees.CellPhone, tblEmployees.Email,
tblEmployees.Competency, tblEmployees.Branch, tblEmployees.Organization,
tblEmployees.Rank, tblEmployees.Company, tblEmployees.Contract,
tblEmployees.Notes, tblSlots.Department, tblSlots.Team, tblSlots.Position
FROM tblSlots INNER JOIN tblEmployees ON tblSlots.Slot = tblEmployees.Slot
WHERE
(((tblEmployees.EmployeeID)=[Forms]![frmEmployeeEntry]![txtEmployeeID]));

I have opened the query at the same time the form is open and filled, but it
shows no data. Is this because the form writes to the table?

The email portion of the code works fine, but the report is always blank.

Thanks for any guidance.
 
K

Klatuu

A form knows nothing about a query that is not its record source.
Put your query in the form's record source property in the properties dialog
box.
 
M

m stroup

Thanks Dave. I had actually done that, though I was not clear stating that.
The problem turned out to be a parenthesis issue in my SQL query. I found it
and it is working beautifully.
--
Teach me to fish! Thanks for the help.
Pax, M


Klatuu said:
A form knows nothing about a query that is not its record source.
Put your query in the form's record source property in the properties dialog
box.
--
Dave Hargis, Microsoft Access MVP


m stroup said:
frmEmployeeEntry writes to tblEmployees.
btnUpdate changes tblBillets.status to "filled" and does a few other chores.
rptForEmail is based on rptForQuery with the following SQL

SELECT tblEmployees.EmployeeID, [FirstName] & " " & [LastName] AS Name,
tblEmployees.FirstName, tblEmployees.LastName, tblEmployees.Type,
tblEmployees.Country, tblEmployees.StartDt, tblEmployees.EndDt,
tblEmployees.Building, tblEmployees.Room, tblEmployees.Cubicle,
tblEmployees.WorkPhone, tblEmployees.CellPhone, tblEmployees.Email,
tblEmployees.Competency, tblEmployees.Branch, tblEmployees.Organization,
tblEmployees.Rank, tblEmployees.Company, tblEmployees.Contract,
tblEmployees.Notes, tblSlots.Department, tblSlots.Team, tblSlots.Position
FROM tblSlots INNER JOIN tblEmployees ON tblSlots.Slot = tblEmployees.Slot
WHERE
(((tblEmployees.EmployeeID)=[Forms]![frmEmployeeEntry]![txtEmployeeID]));

I have opened the query at the same time the form is open and filled, but it
shows no data. Is this because the form writes to the table?

The email portion of the code works fine, but the report is always blank.

Thanks for any guidance.
 
Top