new record macro.

  • Thread starter Thread starter Antonio
  • Start date Start date
A

Antonio

I have a table that contains work instructions/Guidance
for specific personnel in the office. It has four fields:
tblMessage
DutyDay - Date()
SupID - (id of supervisor)
EmpID - (id of employee)
Inst - (specific instructions or on the spot guidance)

Is it possible to create a macro that will automatically
open a form when a new record is added to a table and the
Employee Identification value in EmpID is equal to the
CurrentUser() logged onto the database at the current
time? I would like the form to pop up when they first log
on or any time a record is created with their emp ID. I
set up a query to filter out messages that the Current
User and the EmpID field dont correspond to, and then
made a read and input form off of that.
TIA
 
I added a yes/no box called "read" to the table. The idea
I had was to make a Macro that will open the form if the
EmpID is the Current User And the read box is not checked
off. Then, if the read box is checked off, the macro
would not open it until a new record with the Current
User ID matches the EmpID field And the read box is empty.
I tried this in the Where Condition:

[tblMessage]![Read]=0 And [tblMessage]![To]=CurrentUser()

But the macro still opens the form regardless if the Read
box is checked or not.
Does this mean you cant specify two conditions in
the "Where Condition" of a macro? Or am I going about
this the wrong way entirely?
 
Back
Top