Popup Subforms

OxDavis

Registered User.
Local time
Today, 10:32
Joined
Jul 14, 2005
Messages
74
Alright, I did a search for this and came up blank, but I'm sure its been asked a million times, sorry for the inconvenience:D

Is it possible to make a subform a popup form? I have a client table --1--to-many--> service table and want the service form to popup out of the client form. But I also want to the foreign key to autopopulate just like a subform would. Is there any way to do this? Are there any pitfalls to doing it this way?

Thanks in advance,
Ox
 
Not sure if this is a thick-person answer, but it is how my brain works, so there!!!

If you open the form up, I can see 2 ways of doing it...

1. Send the client ID value in OpenArgs to the popup form, and then copy it in from there.

2. Set the default value of the clientID in the service form to point to the other form, like: Forms!frmClient!ClientID

I think option 2 is probably better.
 
the 2nd one works brilliantly, thanks!
 
The only thing you need to be careful of in the future is if you decide to start opening the service form WITHOUT the client form open.

I believe it may cause an error, when going to a new record, because it can't find the form you are referring to in the default value.
 

Users who are viewing this thread

Back
Top Bottom