OpenArgs are strings - ie text values. If CompanyID is a numeric value (as I suspect), you need to convert it in your form_load event to the suitable format.