Complicated copy/paste, search thing

sir_dan_mitchell

Registered User.
Local time
Today, 10:59
Joined
Feb 5, 2002
Messages
74
hi,

I have a form that looks up values that are based on a query.
e.g. Name

There are only 5 fields in the form.

I want to create a button, and on pressing it, I want the form to close and to open the main form that lists all the fields FOR THAT PARTICULAR person.

My unique identifier is REF_NO.

There is probably some kind of code that will copy the current REF_NO from the particular record, close the form, open the main form, and search with the pasted REF_NO for the particular record.

There might be an easier way of doing this too.?

Can anyone help me with this nightmare of a code?

Dan
 
Macros work for this....

Sir Don,

I have used macros to accomplish this task. Use the OpenForm action in the macro to open your main form and set the where condition to:

mainform.refno = prevform.refno

Then add the close action to the macro to take care of closing your first form.

When you do this, all the appropriate data should appear in your main form if it is based on the table where the data resides.

Good luck,
 

Users who are viewing this thread

Back
Top Bottom