Comparing counts of data on two forms

  • Thread starter Thread starter Matthew Reed via AccessMonster.com
  • Start date Start date
M

Matthew Reed via AccessMonster.com

I have two forms that I'm opening up in Hidden mode. There is a text box in
the footer of each form that uses the Count expression to count the number of
values in the detail section of each form. I want the app to take one action
if the values are different, and another action if they are the same. I
realize this could be done entirely with VBA and recordsets, but I'm not much
of a code writer so I'm trying it purely in the GUI and using Macros.

When I use a conditional macro to compare the values in each count field, it
says "type mismatch". I'm saying
[Forms]![Form1][CountofTheseValues]=[Forms]![Form2]![CountofThoseValues] and
[Forms]![Form1][CountofTheseValues]<>[Forms]![Form2]![CountofThoseValues].

The values I'm counting are both text fields. What could I be doing wrong?

Thanks for any knowledge and assistance!
 
sorry guys, I took a closer look at my syntax and caught a spelling error
that, when fixed, solved the type mismatch problem. my bad.

But now, even if the counted values are different, the test to determine if
they are equal still results that they're equal. Much confusions.

Ring any bells?
Thanks!



Matthew said:
I have two forms that I'm opening up in Hidden mode. There is a text box in
the footer of each form that uses the Count expression to count the number of
values in the detail section of each form. I want the app to take one action
if the values are different, and another action if they are the same. I
realize this could be done entirely with VBA and recordsets, but I'm not much
of a code writer so I'm trying it purely in the GUI and using Macros.

When I use a conditional macro to compare the values in each count field, it
says "type mismatch". I'm saying
[Forms]![Form1][CountofTheseValues]=[Forms]![Form2]![CountofThoseValues] and
[Forms]![Form1][CountofTheseValues]<>[Forms]![Form2]![CountofThoseValues].

The values I'm counting are both text fields. What could I be doing wrong?

Thanks for any knowledge and assistance!
 
Back
Top