View Full Version : Calling a 2nd Form


Henning Bach
02-03-2005, 12:11 AM
Hi all,
i have a "small" problem here and actually i'm to blind to see the solution.

I have a form (called adress) and a second form (called events). In the tablestructure there is a adress file and a events file (which is 1:n to the adress form and linked together with the AdressID).

Now i have a button on the adress form which calls the eventsform by action scripting (open form / browse) and a filter on the AdressID-Key on the events form to show only the events of this adress.

Now i want to add a new event. And here is my problem :
When i add a new event i want the AdressID of the eventform is initialized with the AdressID of the adress form (which calls the event form).

I'm to blind at the moment to see the solution. Any ideas ?


Al Buchholz
02-03-2005, 01:04 AM

I think you are working too hard on this solution. Let Alpha do the work for you.

Make a set that describes the relationship between the Adress table and the events file. Then make one form that is based on the set and the linkage values in the events table will be handled automatically by Alpha.

There is enough work to do. Let product do the basics for you.

Open the sample database Alphasports and look at the invoice set and the forms that are based on it.

Remember to put the control panel in detail view to see the table/set that an object is based on.

See attached image.

Henning Bach
02-03-2005, 02:06 AM
Hi Al,
of course. That was it. Sometimes i'm to blind (still a coding lover) ;-))


Tom Cone Jr
02-03-2005, 03:07 AM

In addition to Al's solution you might be interested in a sample database stored in the Code Archive forum that illustrates 3 different ways to pass values from one form to another. I think the subject / topic there is "Passing values between forms".

-- tom

Henning Bach
02-04-2005, 06:45 AM
Thanks Tom,
exactly what i need.