PC Review


Reply
Thread Tools Rate Thread

command button not opening related fields

 
 
MTSmith
Guest
Posts: n/a
 
      12th Nov 2009
I've made a command button with the wizard to open a related form from the
main form. Ex: On the contact main form, push a button to see all their
contributions. The wizard asks which form to open, I say the Contributions
Form, then it says to match the ID field. However, the Main form listed on
the left has no fields listed. The one on the right lists all the fields for
the Contributions. Why does the Main form not show any fields?

Terry Smith
 
Reply With Quote
 
 
 
 
MTSmith
Guest
Posts: n/a
 
      13th Nov 2009
I do have 2 tables. One is all the client info with the clientID as the
primary key. A related table is the contributions table, where ClientID is
the related field.

When I use the button wizard, it asks what action I want to perform. I
choose Open Form. The next window I say to open the Contribution form. Then I
choose open form and find specific data to display. The next window is Which
fields contain the matching data? the main form is listed at the top of the
box on the left, and the contribution form is on the right. It shows all the
fields in the contribution form, but no fields on the left in which to match
the ClientID. Very weird.

I guess I should explain that I want to do probably two different things
here with 2 different buttons.
One-Be on a client record. Click a button to open the Contributions form to
be able to enter a new contribution. I thought I'd have to do a setvalue to
set the ClientID on the contribution form to match the ClientID on the main
record? But, I cannot figure out how to do the setvalue in a macro.
Two-open the Contribution form just to view all the contributions by the
person in the main record.

Are you saying it's better just to put a subform at the bottom of the main
client record and to hide or show it as needed? I already have one subform on
the main record. Would having 2 or 3 subforms slow down the performance?

Thanks for your input on this. It's very much appreciated.

Terry

"BruceM via AccessMonster.com" wrote:

> The main form doesn't show any fields? What does it show? Where is this
> left and right to which you refer?
>
> It would help to know something of your database design and structure. Also,
> post the command button code.
>
> If you have Contacts and Contributions you should have a table for each,
> related by ContactID (one contact, several contributions). With a main form
> based on the Contacts table and a subform based on the Contributions table
> there is no need to open another form. Rather, you can make the subform
> visible or not as needed. If you wish to use a separate form for
> Contributions you still need it to be related to the Contact table.
>
> MTSmith wrote:
> >I've made a command button with the wizard to open a related form from the
> >main form. Ex: On the contact main form, push a button to see all their
> >contributions. The wizard asks which form to open, I say the Contributions
> >Form, then it says to match the ID field. However, the Main form listed on
> >the left has no fields listed. The one on the right lists all the fields for
> >the Contributions. Why does the Main form not show any fields?
> >
> >Terry Smith

>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...esign/200911/1
>
> .
>

 
Reply With Quote
 
MTSmith
Guest
Posts: n/a
 
      13th Nov 2009

I put a 2nd subform for the contributions, and it is what I wanted. It
automatically fills in the ClientID number and I can add new entries right
there. Is this the best way to do it? I still wonder about slowing down
performance with too many subforms.

I guess I used Access so long ago that I keep thinking I have to open a
separate form to add contributions, or view a list of contributions. It's
just that when you do use separate forms for entering data, it does not
automatically fill in the Client ID #, even though the tables are related.

Please let me know if it's better just to use the subform. My other 2
subforms will be a list of each family member, and a list of events the
family participates in.


"MTSmith" wrote:

> I do have 2 tables. One is all the client info with the clientID as the
> primary key. A related table is the contributions table, where ClientID is
> the related field.
>
> When I use the button wizard, it asks what action I want to perform. I
> choose Open Form. The next window I say to open the Contribution form. Then I
> choose open form and find specific data to display. The next window is Which
> fields contain the matching data? the main form is listed at the top of the
> box on the left, and the contribution form is on the right. It shows all the
> fields in the contribution form, but no fields on the left in which to match
> the ClientID. Very weird.
>
> I guess I should explain that I want to do probably two different things
> here with 2 different buttons.
> One-Be on a client record. Click a button to open the Contributions form to
> be able to enter a new contribution. I thought I'd have to do a setvalue to
> set the ClientID on the contribution form to match the ClientID on the main
> record? But, I cannot figure out how to do the setvalue in a macro.
> Two-open the Contribution form just to view all the contributions by the
> person in the main record.
>
> Are you saying it's better just to put a subform at the bottom of the main
> client record and to hide or show it as needed? I already have one subform on
> the main record. Would having 2 or 3 subforms slow down the performance?
>
> Thanks for your input on this. It's very much appreciated.
>
> Terry
>
> "BruceM via AccessMonster.com" wrote:
>
> > The main form doesn't show any fields? What does it show? Where is this
> > left and right to which you refer?
> >
> > It would help to know something of your database design and structure. Also,
> > post the command button code.
> >
> > If you have Contacts and Contributions you should have a table for each,
> > related by ContactID (one contact, several contributions). With a main form
> > based on the Contacts table and a subform based on the Contributions table
> > there is no need to open another form. Rather, you can make the subform
> > visible or not as needed. If you wish to use a separate form for
> > Contributions you still need it to be related to the Contact table.
> >
> > MTSmith wrote:
> > >I've made a command button with the wizard to open a related form from the
> > >main form. Ex: On the contact main form, push a button to see all their
> > >contributions. The wizard asks which form to open, I say the Contributions
> > >Form, then it says to match the ID field. However, the Main form listed on
> > >the left has no fields listed. The one on the right lists all the fields for
> > >the Contributions. Why does the Main form not show any fields?
> > >
> > >Terry Smith

> >
> > --
> > Message posted via AccessMonster.com
> > http://www.accessmonster.com/Uwe/For...esign/200911/1
> >
> > .
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Freeze fields with a command button click PJ Microsoft Access Forms 4 27th May 2010 10:44 PM
Command Button to Lock Form Fields Ben Microsoft Access Form Coding 3 13th May 2009 08:08 PM
Re: How to Make Bold a Command Button Bold If Related Table Has Data doyle60@aol.com Microsoft Access VBA Modules 0 3rd Mar 2009 07:56 PM
Command button wizard won't open related form =?Utf-8?B?TWFya0I=?= Microsoft Access 4 18th Sep 2007 11:37 PM
Create New Set Of Fields USing Command Button =?Utf-8?B?Rml0Y2g=?= Microsoft Access Forms 0 19th Jul 2005 05:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:47 PM.