Tim,
That's a good idea. In fact, it's what I do in FoxPro most of the time with buttons. I get so focused on the things that are different in .NET I sometimes forget the things that should be the same.
>Hi Linda,
>
>>I have a form which has a variety of criteria a user can enter for locating a particular record. If they enter a specific id, I would like to go ahead and fire the click method of the button to locate a record. It seems like it should be obvious to me but I can't figure out what parameters to pass to the click method. I tried passing the arguments that were passed to the Leave method of the text box but that did not work. Can anyone help with this? Thanks.
>
>It would be better to factor the code in the button click out so you can call it from other places.
>
>
>
>private void btnGetRecords_Click(sender object, EventArgs e)
>{
> // Move all your code here to the GetRecords method
> this.GetRecords()
>}
>
>private void GetRecords()
>{
> // Put all your code that was in the click event here so you can call it from multiple places
>}
>
>
>
>Hope that helps and answers your question
>Tim
Linda Harmes
HiBit Technologies, Inc.