Automated Entry

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

Guest

I have a form that pops up when you enter my database. This is a message log
to the employees. It tells them of new functions or messages my supervisors.
I want to add a field to my table that notes what is on that form. Example
if it is about radios I want it to state RADIO in a cell.

Now I assume it is the same theory behind UserID or Date/Time but how would
I state this in VBA?

Private Sub Form_Load()
Me![User] = CurrentUser()
Me![Date] = Now()
ME![Type]= ??????????????????
End Sub


Thanks in advance
Jen
 
The easiest way to do this is to add a table to your database that has one
record and one field. Put the text you want to display in it. Make the
table the Record Source for your form. Make the field you want to display the
Control Source of the control where you want to display it.

Now there is a way to do all this with no VBA at all. I would recommend
this. Instead of putting the code in the Load event. Make the function
calls the Control source of your text boxes. In the Properties Dialog for
each control, select that data tab and in the Control source text box
=CurrentUser() To display the user
=Date() To display the current date.
 
Actually I was hoping to be able to do this in VBA, I want to be able to
change this field at required times. I have numerous people signing into it.


So I want to say when they click the acknowledge button they have read the
notices posted.

Thanks
Jen


Klatuu said:
The easiest way to do this is to add a table to your database that has one
record and one field. Put the text you want to display in it. Make the
table the Record Source for your form. Make the field you want to display the
Control Source of the control where you want to display it.

Now there is a way to do all this with no VBA at all. I would recommend
this. Instead of putting the code in the Load event. Make the function
calls the Control source of your text boxes. In the Properties Dialog for
each control, select that data tab and in the Control source text box
=CurrentUser() To display the user
=Date() To display the current date.


Jen said:
I have a form that pops up when you enter my database. This is a message log
to the employees. It tells them of new functions or messages my supervisors.
I want to add a field to my table that notes what is on that form. Example
if it is about radios I want it to state RADIO in a cell.

Now I assume it is the same theory behind UserID or Date/Time but how would
I state this in VBA?

Private Sub Form_Load()
Me![User] = CurrentUser()
Me![Date] = Now()
ME![Type]= ??????????????????
End Sub


Thanks in advance
Jen
 
You have to have some place to store the text unless you plan to modify and
redistribute your application every time you want to change the message. The
way I proposed, all you have to do is open the table and change the text in
the field.

Jen said:
Actually I was hoping to be able to do this in VBA, I want to be able to
change this field at required times. I have numerous people signing into it.


So I want to say when they click the acknowledge button they have read the
notices posted.

Thanks
Jen


Klatuu said:
The easiest way to do this is to add a table to your database that has one
record and one field. Put the text you want to display in it. Make the
table the Record Source for your form. Make the field you want to display the
Control Source of the control where you want to display it.

Now there is a way to do all this with no VBA at all. I would recommend
this. Instead of putting the code in the Load event. Make the function
calls the Control source of your text boxes. In the Properties Dialog for
each control, select that data tab and in the Control source text box
=CurrentUser() To display the user
=Date() To display the current date.


Jen said:
I have a form that pops up when you enter my database. This is a message log
to the employees. It tells them of new functions or messages my supervisors.
I want to add a field to my table that notes what is on that form. Example
if it is about radios I want it to state RADIO in a cell.

Now I assume it is the same theory behind UserID or Date/Time but how would
I state this in VBA?

Private Sub Form_Load()
Me![User] = CurrentUser()
Me![Date] = Now()
ME![Type]= ??????????????????
End Sub


Thanks in advance
Jen
 
Back
Top