Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Populate fields based on Log In screen

Status
Not open for further replies.

cjdecou

Technical User
Apr 24, 2014
12
US
Good Morning,

I am sure that this has been asked many times and as I am knew to doing this extensive a db creating, I have a question for you.

I have a form that I am trying to get a couple of fields to auto populate based off of when the user logs into the db. The user logs into the db using ID and Password. At that time it goes to a switchboard which then they are able to choose the form which has their Name and ID (fields to be auto populate) on it.

For the Log in screen, I have a query (User Activity User) that runs to verify both the ID and the password and the access rights (admin or User). On this query it generates the following information

ID
Username
Password.

I have tried using the following and have had no luck

[ul]
[li][/li]
[/ul]=currentUsername()
[ul]
[li][/li]
[/ul]SELECT [User Activity User].UserName FROM [User Activity User] ORDER BY [UserName]; (which gives me the inforamtion needed but ask for paremeters to be entered repeatly)

Here is some of the coding that I have and

Private Sub Submit_Click()
On Error GoTo Err_Submit_Click

DoCmd.GoToRecord , , acNext

Exit_Submit_Click:
Exit Sub

Err_Submit_Click:
MsgBox Err.Description
Resume Exit_Submit_Click

End Sub
Private Sub save_Click()
On Error GoTo Err_save_Click


DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Exit_save_Click:
Exit Sub

Err_save_Click:
MsgBox Err.Description
Resume Exit_save_Click

End Sub


Private Sub Next_Click()
On Error GoTo Err_Next_Click


DoCmd.GoToRecord , , acNext

Exit_Next_Click:
Exit Sub

Err_Next_Click:
MsgBox Err.Description
Resume Exit_Next_Click

End Sub


Any assistance would be greatly appreciated. Please be specific because as i mentioned before I am new to this extensive of code writing.

Chekotah

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top