Two Current Users

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with two fields. A and B.
I want to store the current user opening the form in these two fields, when
the user presses Command button save.
How to
1-save the current user in field A only, when the command button is pressed
for the first time. Then the form is closed
2-save the current user in field B only when the form is opened again and
the command button is pressed.

Please can you help me solve this problem
 
Add this code to your button that saves the record:

If isnull(me.A) then
me.A=environ("USERNAME")
end if

me.B = environ("USERNAME")
 

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

Back
Top