Create a variable in the form private int UserId = -1; // constructor for the form with no id passed in public frmUser() { } // Constructor for the form with a userid passed in public frmUser(int userId) { this.UserId = userId; } public frmUser_Load(object sender, EventArgs e) { if (this.UserId > -1) { // We are editing, so get call a function to get the data and bind it to the controls. } } Now to use this from somewhere else all you need to do is initialize the form. frmUser oUser = new frmUser(); or if you want to edit frmUser oUser = new frmUser(id); frmUser.ShowDialog();>Next newby question.
>frmUser oUser = new frmUser(); > >// If creating a new user... >oUser.SetupForm(); > >// If opening an existing user... >oUser.SetupForm(iUserKey); > >oUser.ShowDialog(); >>