Field in form not seen if subform

Jan van Bekkum

Registered User.
Local time
Tomorrow, 00:16
Joined
Feb 25, 2010
Messages
23
I use in a macro the condition
[Forms]![Proposals]![FlagProductListCreatedSet]=False

I trigger the macro using a button in form [Proposals]

This works well if the form [Proposals] is opened directly, but if it is opened as a subform I get the message "MS Access can't find the form Proposals referred to..." although the focus is on a field in [Proposals]

Has anyone a clue?
 
Thanks,

I guess I'll need to learn VBA.

In the macro I entered [Me]![FlagProductListCreatedSet]=False (the square brackets are added by access) but get "The object doesn't contain the Automation Object 'Me'.
 
I don't think you can use the Me keyword in macros because it is independent of the form module or object that's using it.

Two questions:

1. From which form are you calling the FlagProductListCreatedSet field? In the Proposals subform or the main form?
2. What is your goal for performing that function?
 
Thanks for your reply.

I call it through a button I made in the subform.

My objective is to append data from one table into another, but to let that happen only once per record in [Proposals]

The macro contains a conditional open query. The query appends data to the table and sets a flag in the [Proposals] table that data has been added. The query is only executed if the flag is clear.

The formula I am wrestling with is the one for the conditional open query.
 
[Forms]![CreateOpportunity]![Proposals].[Form]![FlagProductListCreatedSet]=False

Try the above.
 

Users who are viewing this thread

Back
Top Bottom