I have a form with a datagridview bound to a database that has recorded who entered data into via the windows user id.

I am trying to filter the datagridview to only display records created by the user that is currently logged in.

I can get the windows user name with function getusername() which returns a string.

The field that houses the username is "staff_entering_referral"

I am doing this but the datagridview does not update or change.

bindingsource.filter = "staff_entering_referral = '" & getusername & "'"

I have even tried hard coding the username to test and that doesn't work either.

any help is greatly appreciated.

Steve