G
gorsoft
A form with product details with a one row subform showing the
salesperson assigned on the basis of a franchise . The subform is
linked to the main form using link master/child fields comprising two
fields. The data in the subform appears as soon as the data in the
second of the two fields is populated. This part of the code works
fine.
I have code in the “on exit” event of the second of the two link
fields to test If there is no record in the subform:
If Me!sfrmSalesPersonLink.Form.RecordsetClone.RecordCount = 0 Then
...... show a dialog box asking if the user wishes to create a new link
between salesperson and product.
Again this part of the code works fine when there is no record in the
subform. The problem is that my dialog box is appearing even if there
is a link already. If I say no the dialog box, then the subform is
populated.
It seems as if the link between form and subform is triggering after
the event code to test if there any link. How do I get round this?
Gordon
salesperson assigned on the basis of a franchise . The subform is
linked to the main form using link master/child fields comprising two
fields. The data in the subform appears as soon as the data in the
second of the two fields is populated. This part of the code works
fine.
I have code in the “on exit” event of the second of the two link
fields to test If there is no record in the subform:
If Me!sfrmSalesPersonLink.Form.RecordsetClone.RecordCount = 0 Then
...... show a dialog box asking if the user wishes to create a new link
between salesperson and product.
Again this part of the code works fine when there is no record in the
subform. The problem is that my dialog box is appearing even if there
is a link already. If I say no the dialog box, then the subform is
populated.
It seems as if the link between form and subform is triggering after
the event code to test if there any link. How do I get round this?
Gordon