Command button problem

  • Thread starter Thread starter Lori2836 via AccessMonster.com
  • Start date Start date
L

Lori2836 via AccessMonster.com

I have 2 command buttons. The first views all data in a subform. The second
prompts for a user name to view data just for that particular user. They
are each using a different subform (data coming from same query), and the
code in the event is calling out the correct subform. My problem is if I
make a change to the second command button, the first one also changes (such
as changing record source). Why is this happening?

Thanks!
 
You don't need to use multiple sub forms for this. You are only complicating
your application. You can use the same sub form for everything. All you
need to do is after you get the user name, filter the subform and requery it.
Just have the first button remove the filter and requery.
 
Thanks Klatuu. Since I'm not "Access savvy"....how would I filter the
subform using the 2nd command button and requery?

Thanks for your help!
You don't need to use multiple sub forms for this. You are only complicating
your application. You can use the same sub form for everything. All you
need to do is after you get the user name, filter the subform and requery it.
Just have the first button remove the filter and requery.
I have 2 command buttons. The first views all data in a subform. The second
prompts for a user name to view data just for that particular user. They
[quoted text clipped - 4 lines]
 
I have both buttons, along with others, on the Switchboard.....the 1st button
says "Update Sheets" and the 2nd says "View Sheets by Initiator". Upon the
click of each, it brings up the subform. But the 1st button is asking to
enter the Initiator name, which it shouldn't. It is somehow picking this up
from the 2nd button.
I am finding that I truly do not like Access........very confusing!


Are the command buttons on the main form or on the sub form?
You don't need to use multiple sub forms for this. You are only complicating
your application. You can use the same sub form for everything. All you
[quoted text clipped - 9 lines]
 
Access can be confusing until you get the hang of it, then it becomes a very
powerful tool. The problem is, without some prior experience with relational
database systems, you have a way to go.

The buttons will not get confused between themselves. At some point, the
two are referring to the same object which makes it appear they are doing the
same thing.

What you need to do to detemine what the buttons are doing is open the
Switchboard manager, find the buttons, and see what action they take.

You get to the Switchboard manager through the menu bar with Tools, Database
Utilities, Switchboard manager.

Lori2836 via AccessMonster.com said:
I have both buttons, along with others, on the Switchboard.....the 1st button
says "Update Sheets" and the 2nd says "View Sheets by Initiator". Upon the
click of each, it brings up the subform. But the 1st button is asking to
enter the Initiator name, which it shouldn't. It is somehow picking this up
from the 2nd button.
I am finding that I truly do not like Access........very confusing!


Are the command buttons on the main form or on the sub form?
You don't need to use multiple sub forms for this. You are only complicating
your application. You can use the same sub form for everything. All you
[quoted text clipped - 9 lines]
 
Back
Top