If you place a textbox control on Frm_MainMenu and name it, "txtUserId", you can use the following code to assign the user ID to the new textbox control.
Code:
'Check value of password in tbl_Users to see if this
'matches value chosen in combo box
If Me.txtPassword.Value = DLookup("Password", "tbl_Users", _
"[UserId]=" & Me.CboUsername.Value) Then
'UserId = Me.CboUsername.Value
'Close logon form and open Main Menu
DoCmd.OpenForm "Frm_MainMenu"
Forms!Frm_MainMenu.txtUserId.Value = Me.CboUsername.Value
DoCmd.Close acForm, "Frm_LoginScreen", acSaveNo
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, _
"Invalid Entry!"
Me.txtPassword.SetFocus
End If
Then you can use code in the OnCurrent event of your Frm_AddFertilizer to assign the User ID to your Tbl_Fertilizers.
Code:
If Me.NewRecord = True Then
Me![NameOfFieldForUserId] = Forms!Frm_MainMenu.txtUserId
End If
One thing that I noticed is that you are requesting to add the "Name" of the User. I suggest you store the Primary Key of the User ID. The name is in the Combo in the Me.CboUsername.Column(1)