I want to open a popup form with related records in a macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

At present when I call the macro from the source form, I am either getting
all the related records or none in the target (related) form. I have tried
using the standard filter and WHERE statements so I must be doing something
wrong here. The macro is called from a command button on the souurce form,
just tests the open criteria and then opens the popup if the conditions are
TRUE.
 
Without more of an idea how you populate the popup form it will be tough to
help you diagnose what it's doing...
 
In the source form I have client data with a key of ClientID. On the source
form is a command that calls a macro to test the criteria in the source form
to permit the opening of the popup form. The popup form contains data related
to each client. The link field on the target form is also ClientID. When I
use the command key wizard to link the two forms everything works fine so I
know the links work. However I can't replicate this within a macro. Does this
help?
 
Hi,
When you use the open form action from a macro you will be given the option
of Where. You could put in [ClientID]=Form![ClientID].
Banterista said:
In the source form I have client data with a key of ClientID. On the source
form is a command that calls a macro to test the criteria in the source form
to permit the opening of the popup form. The popup form contains data related
to each client. The link field on the target form is also ClientID. When I
use the command key wizard to link the two forms everything works fine so I
know the links work. However I can't replicate this within a macro. Does this
help?
Without more of an idea how you populate the popup form it will be tough to
help you diagnose what it's doing...
[quoted text clipped - 7 lines]
 
Back
Top