Sir Nado
03-15-2000, 01:53 PM
I know this has probably been posted in here before but I can't find it. One is close but doesn't work for what I want. I am very new to Access. I have 2000. I want to be able to change a combo list, (say a username), and have it update the entire form to that usernames information. What is the best way of doing this?
Carol
03-16-2000, 07:33 AM
On your form place an unbound combo box with a table/query showing your username which you want to select. In the AfterUpdate on this combo box, insert this code:
Sub FieldName_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Surname] = '" & Me![FieldName] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Change the names accordingly. FieldName represents the combobox name.
Good Luck.
Sir Nado
03-16-2000, 10:00 AM
Ok, here is what I have,
Sub Combo22_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Surname] = '" & Me![Combo22] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
I am not familiar with VB syntax. I have tried to remove the brackets on both surname and combo22.
Thank you for your help.
Carol
03-16-2000, 12:56 PM
Coding is correct, make sure that you have your form's underlying query correct. Your recordsource should name the table and/or query that has all the records in it that you want on your form.