Openning a Form

E

Emma

Hi, I'm trying to have a form open the correct data and if there's no data
for the form ie no worker then add the current worker and current date.
Unfortunately it's not working. Everytime I open a form that has information
the new worker and date are being added. Here's my code can anybody help me?
Private Sub Form_Current()
If IsNull(Me![3M Worker]) Then
Me![3M Worker] = CurrentUser
Me![Follow Up Date 3M] = Date
End If
End Sub
 
E

Emma

I just realized that something weird is happening when I type in Me. there is
no 3M data just 6M and 1Y. Likewise when I go into the 6M form and type Me.
there is no 6M data just 3M and 1Y which aren't on the form but are in the
table.
 
J

John W. Vinson

Hi, I'm trying to have a form open the correct data and if there's no data
for the form ie no worker then add the current worker and current date.
Unfortunately it's not working. Everytime I open a form that has information
the new worker and date are being added. Here's my code can anybody help me?
Private Sub Form_Current()
If IsNull(Me![3M Worker]) Then
Me![3M Worker] = CurrentUser
Me![Follow Up Date 3M] = Date
End If
End Sub

Emma, nobody can possibly help based on this information. What's the
recordsource of your Form? What are your relevant tables? How are they
related? What's 6M data (your second post)? How can the form identify "the
current worker"?
 

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

Top