I have a mainform & subform and two combo boxes.
Data: combo box 1 has user name and combo 2 has user id
scenario: when I select user name (from combox 1) appropriate user id must display in combox box 2 and display the realted data in subform.
example:
Name1
User1 should display
User1 Name1 environemnt Profile ....
I have the below code but as soon as I select as combo 2, the subform data is going to default not the user that I select.
when I click on select all command button
Expand|Select|Wrap|Line Numbers
- 'Dim db As DAO.Database
- 'Dim rs As DAO.Recordset
- '
- 'Set db = CurrentDb
- 'Set rs = db.OpenRecordset("tblUsernameuserid")
- 'Do While Not rs.EOF
- 'rs.Edit
- 'rs!UseThisID = 1
- 'rs.Update
- 'rs.MoveNext
- 'Loop
- '
- 'rs.Close
- 'Set rs = Nothing
- 'Me.Requery