A very simple question which I cant answer myself at the meoment due to epic tiredness.
I have a combobox in my access 2003 database which is populated with the real names of users taken from a securtiy table based on their securityID number.
The rowsource of the combobox therefore is:
This allows an admin to select the user who will be the owner of a current record on a form. What I wish to add is a button placed beside this combobox, which upon being clicked will set the combobox value to that of the person who clicked it. Therefore assigning ownership to themselves.
The above code takes the securityID (which is the bound column of the combobox) from a hidden form I use to authenticate throughout the database. The problem I am having is that when I click the button the value is not updated until I set focus to the box (manually by clicking in).
I have tried to refresh the combobox using:
And also refresh and setfocus etc but nothing seems to work I just get the error:
"Method or data member not found" on the Owner.Requery line.
Thanks for any input,
Chris
I have a combobox in my access 2003 database which is populated with the real names of users taken from a securtiy table based on their securityID number.
The rowsource of the combobox therefore is:
Code:
SELECT SecurityID, [FName] & " " & [SName] AS Name FROM tblSecurity;
Code:
Private Sub btnMeOwner_Click()
On Error GoTo BrokenDown
Me.Owner = Forms!frmhidden.txtSecurityID
Quitter:
Exit Sub
BrokenDown:
MsgBox Err.Description
Resume Quitter
End Sub
I have tried to refresh the combobox using:
Code:
Private Sub btnMeOwner_Click()
On Error GoTo BrokenDown
Me.Owner = Forms!frmhidden.txtSecurityID
Owner.Requery
Quitter:
Exit Sub
BrokenDown:
MsgBox Err.Description
Resume Quitter
End Sub
"Method or data member not found" on the Owner.Requery line.
Thanks for any input,
Chris
Comment