Printing from a dialog box to a text box on another form.

In the dialog box that I have created, my intent is for the user to search for a desired name. He/She would type the name into the dialog box's text box and press a "Find" command button. The code behind the "Find" button would print the results of the search in a text box on another form. In addition, there are two other text boxes on this second form for two other fields in addition to the name. If possible, when the user presses the "Find" button, and the searched text appears in the first text box, I would like the other two text boxes to fill automatically with related information (the database has three fields in it and the three text boxes correspond to each of the fields; the other two need to fill when the search on the first is done).

I hope that this message is not too "convoluted." Any help with the code would be appreciated.


  • I'm not sure what answer your looking for. Is it

    moving variables between forms? Or the link between

    the fields in the database, so when one shows the

    other fields will show with it?

    For moving information between forms, you could

    set a variable to GLOBAL in your first form or

    a module. The value of the variable will remain

    between forms.


    GLOBAL SearchResult as STRING

    To tie the fields together so they will all show

    when one of the fields is displayed, just set all

    of the text or label controls to the same

    data control, (but link them to the seperate

    fields of the database). When you move the

    data control to the selected record, all the

    fields will automatically be updated with the

    field values of that record.

    hope it helps!


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!