Hi all,
I have a problem that I've been struggling with for a week.
I have a form with one text box (called "Originator") and an "OK" button.
I'd like the user to type in thier name, then when the "OK" button is clicked, I would like to write the name to a field in my table.
-------------------------------------
Private Sub Command2_Click()
user = [Forms]![Form1]![Originator]
DoCmd.OpenTable "ECRlog", acViewNormal, acEdit
DoCmd.GoToRecord acDataTable, "ECRlog", acNewRec
DoCmd.GoToControl "Originator"
'what goes here?
End Sub
-------------------------------------
So far, I have the users name saved as the variable "User". I have the table ("ECRlog") open. A new record has been created and my cursor is waiting in the field called "Originator".
This part was a peice of cake.
Now I want to write the variable "User" in that field and haven't found anything in the help file or the manuals here at work.
The "real" program is a lot more complex. I've stripped it down to one form and one table with the above code to find the command. I can sent it to you if you'd like?
I've had no formal training in this so please go easy on me.
Thanks in advance!!
Dave
I have a problem that I've been struggling with for a week.
I have a form with one text box (called "Originator") and an "OK" button.
I'd like the user to type in thier name, then when the "OK" button is clicked, I would like to write the name to a field in my table.
-------------------------------------
Private Sub Command2_Click()
user = [Forms]![Form1]![Originator]
DoCmd.OpenTable "ECRlog", acViewNormal, acEdit
DoCmd.GoToRecord acDataTable, "ECRlog", acNewRec
DoCmd.GoToControl "Originator"
'what goes here?
End Sub
-------------------------------------
So far, I have the users name saved as the variable "User". I have the table ("ECRlog") open. A new record has been created and my cursor is waiting in the field called "Originator".
This part was a peice of cake.
Now I want to write the variable "User" in that field and haven't found anything in the help file or the manuals here at work.
The "real" program is a lot more complex. I've stripped it down to one form and one table with the above code to find the command. I can sent it to you if you'd like?
I've had no formal training in this so please go easy on me.
Thanks in advance!!
Dave