As it will be very apparent in a moment, I am very new to Access and learning on the fly. (Much fun, but frustrating at the same time)
I currently am trying to get a Combo Box that I created with the Combo Box wizard to run its After Update code on Form Open instead.
The current code looks like this:
Expand|Select|Wrap|Line Numbers
- Private Sub Combo10_AfterUpdate()
- ' Find the record that matches the control.
- Dim rs As Object
- Set rs = Me.Recordset.Clone
- rs.FindFirst "[UserName] = '" & Me![Combo10] & "'"
- If Not rs.EOF Then Me.Bookmark = rs.Bookmark
- End Sub
CurrentUser()
and the Row Source of the Box to:
SELECT Student_Information.UserName FROM Student_Information;
P.S. I have also tried putting CurrentUser() in the Control Source field.
More Details:
What I am trying to do is have the students access forms that they need to fill out, however I dont want the students looking at other students information, so I want it to populate the form based on the current users login name.
Am I going about this the wrong way, or am I just missing some really simple step.
Thanks in advance.