Date Formula

A

Aurora

I am using Access 2000
I am creating a form in which employee sign out when they
check out tools. I want the current date to automaticlly
come up when their Emp ID is entered into that field. Ex:
Employee enters his ID# (6252) and the Date field would
automatically fill in today's date. I started with a
formula - "iif([empid]>6000,[dateout], What?) I don't
know what to put if the empid is empty. I don't really
want anything in the date field until the employee has
entered his ID number. Any suggestions??

Aurora
 
S

Steve Schapel

Aurora,

I think I understand what you want. Try code like this on the After
Update event of the EmpID control on the form...

If Me.EmpID > 6000 Then
Me.DateOut = Date
Else
Me.DateOut = Null
End If
 
G

Guest

replace what? with date(),

I think you are trying to create some kind of log, Here are some ideas you
may want to consider:

-Table with Employee Ids and their Names,
-Table to track logs (fields Employee_Id,Dated,Notes,etc.)
-Every time an Employee enters a valid Id in your form, have the form append
a record in the log table, you may want the Dated field in the log table
default to date()
 
A

Aurora

You hit on exactly what I am trying to do (1 to many
relationship. Except they want a report with a check box
to tell them if the tool is signed out at that particular
time. And, a report to show who has used the tools. I am
trying to figure out how to make a check box click on and
off as the tool is taken and returned. Do you have any
ideas or can you point me to an article that might help me?
Thank you for your help - I really appreciate it.

Aurora
-----Original Message-----
replace what? with date(),

I think you are trying to create some kind of log, Here are some ideas you
may want to consider:

-Table with Employee Ids and their Names,
-Table to track logs (fields Employee_Id,Dated,Notes,etc.)
-Every time an Employee enters a valid Id in your form, have the form append
a record in the log table, you may want the Dated field in the log table
default to date()

--
jl5000
<a href="http://joshdev.com"></a>


Aurora said:
I am using Access 2000
I am creating a form in which employee sign out when they
check out tools. I want the current date to automaticlly
come up when their Emp ID is entered into that field. Ex:
Employee enters his ID# (6252) and the Date field would
automatically fill in today's date. I started with a
formula - "iif([empid]>6000,[dateout], What?) I don't
know what to put if the empid is empty. I don't really
want anything in the date field until the employee has
entered his ID number. Any suggestions??

Aurora
.
 
G

Guest

-Create a table for your tools with a yes/no field (check box)
-In the log form allow the user to select a tool from the new table
-create a macro that appends to the log table and also runs a query to
update the check box field in your tools table

--
jl5000
<a href="http://www.joshdev.com"></a>


Aurora said:
You hit on exactly what I am trying to do (1 to many
relationship. Except they want a report with a check box
to tell them if the tool is signed out at that particular
time. And, a report to show who has used the tools. I am
trying to figure out how to make a check box click on and
off as the tool is taken and returned. Do you have any
ideas or can you point me to an article that might help me?
Thank you for your help - I really appreciate it.

Aurora
-----Original Message-----
replace what? with date(),

I think you are trying to create some kind of log, Here are some ideas you
may want to consider:

-Table with Employee Ids and their Names,
-Table to track logs (fields Employee_Id,Dated,Notes,etc.)
-Every time an Employee enters a valid Id in your form, have the form append
a record in the log table, you may want the Dated field in the log table
default to date()

--
jl5000
<a href="http://joshdev.com"></a>


Aurora said:
I am using Access 2000
I am creating a form in which employee sign out when they
check out tools. I want the current date to automaticlly
come up when their Emp ID is entered into that field. Ex:
Employee enters his ID# (6252) and the Date field would
automatically fill in today's date. I started with a
formula - "iif([empid]>6000,[dateout], What?) I don't
know what to put if the empid is empty. I don't really
want anything in the date field until the employee has
entered his ID number. Any suggestions??

Aurora
.
 
G

Guest

I did create a table with all of the tools listed and created a table to log
the employees who take and return the tools. How would I write a macro to do
what you said? That is what I thought I wanted to do, but I thought it had
to be in basic language and I don't know how to write code. Can you point me
in the right direction?

Thank you for your help - aurora

jl5000 said:
-Create a table for your tools with a yes/no field (check box)
-In the log form allow the user to select a tool from the new table
-create a macro that appends to the log table and also runs a query to
update the check box field in your tools table

--
jl5000
<a href="http://www.joshdev.com"></a>


Aurora said:
You hit on exactly what I am trying to do (1 to many
relationship. Except they want a report with a check box
to tell them if the tool is signed out at that particular
time. And, a report to show who has used the tools. I am
trying to figure out how to make a check box click on and
off as the tool is taken and returned. Do you have any
ideas or can you point me to an article that might help me?
Thank you for your help - I really appreciate it.

Aurora
-----Original Message-----
replace what? with date(),

I think you are trying to create some kind of log, Here are some ideas you
may want to consider:

-Table with Employee Ids and their Names,
-Table to track logs (fields Employee_Id,Dated,Notes,etc.)
-Every time an Employee enters a valid Id in your form, have the form append
a record in the log table, you may want the Dated field in the log table
default to date()

--
jl5000
<a href="http://joshdev.com"></a>


:

I am using Access 2000
I am creating a form in which employee sign out when they
check out tools. I want the current date to automaticlly
come up when their Emp ID is entered into that field. Ex:
Employee enters his ID# (6252) and the Date field would
automatically fill in today's date. I started with a
formula - "iif([empid]>6000,[dateout], What?) I don't
know what to put if the empid is empty. I don't really
want anything in the date field until the employee has
entered his ID number. Any suggestions??

Aurora

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

select date from list 1
Look Up Tables 2
Date Formula 4
Record selector on a sub-form 3
Must Fill in a Field 4
simple time sheet input bi-weekly 8
Locked Fields 2
Confusing Type Mismatch 2

Top