Ok, let's do it again
This is the code for your command button on the 1st form:
Sub btnClose_Click()
Dim uzerID As Integer
uzerID = Me.UserID
DoCmd.OpenForm "Form2", , , , , , uzerID
Docmd.close acForm, me.name
End Sub
The openform method takes several arguments (check vba help for details on openform, or any method, for that matter), the last being the OpenArgs method. In Vba, arguments are separated by comma. If u leave an argument blank, the default value for that arg will be used. OpenArgs is just a way to pass a parameter/argument to the form/report being opened. Here uzerID gets the value of your underlying table's user id, the one u would like to enter in the new record on the 2nd form, right?
Now Form2:
The following procedure is your 2nd form's Load_Event procedure (just paste and copy it in the 2nd form's module). the GoToRecord method will take u directly to a new row (record) of the underlying table. This code is not necessary if you set your form's DataEntry property to yes, since this will automatically take you to a new record when you open the form.
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub
Now we're already on a new row in the recordset. The form_current event procedure fires whenever you change from one record to another (again see vba help for details), since we moved to a new record, it will fire and force your UserID field to asssume the value passed into the form's OpenArgs (remember?).
Private Sub Form_Current()
Me.UserID = Me.Openargs
End Sub
Hope you're less confused now.
regards,
premy