SInce this is your homework, I won't give you code - you should do something fro yourself! And besides, it is all in your notes.
1) Create a connection to your access database. Look at an
OleDbConnection[
^], and get the connection string from the Server Explorer pane: click on your database and it will show in the Properties pane.
2) Create a command to the database. Look at an
OleDbCommand[
^] using an SQL SELECT statement. Use parametrized query to access the data:
SELECT [User ID] FROM users WHERE [User Name]=@UN
3) Get the required user name into a string, and include it as a parameter:
mySqlCommand.Parameters.AddWithValue("@UN", myStringWithTheUserNameInIt);
4) Execute the command into a dataReader. Look at
OleDbDataReader[
^]
5) Read the data from the reader for later.