Create new record for the subform

F

FJC

Hi,
I have a form with a subform -- company (form) / Product (subform). The
purpose of the form is to view a company's record, while also viewing the
company's products.

I would like to create a button that would allow me to be viewing the company
record, and then click the button to add a new product for the company.

This seems like it should be pretty simple but I only have basic VB
understanding. Could someone help me out with the code?

Thanks.
 
D

Dirk Goldgar

FJC said:
Hi,
I have a form with a subform -- company (form) / Product (subform). The
purpose of the form is to view a company's record, while also viewing the
company's products.

I would like to create a button that would allow me to be viewing the
company
record, and then click the button to add a new product for the company.

This seems like it should be pretty simple but I only have basic VB
understanding. Could someone help me out with the code?


Is there some reason you don't want to just click or tab to the "new record"
row on the subform and enter the new product there?
 
F

FJC

Doh. Will that always be associated with the current (displayed) company?

Dirk said:
Hi,
I have a form with a subform -- company (form) / Product (subform). The
[quoted text clipped - 7 lines]
This seems like it should be pretty simple but I only have basic VB
understanding. Could someone help me out with the code?

Is there some reason you don't want to just click or tab to the "new record"
row on the subform and enter the new product there?
 
D

Dirk Goldgar

FJC said:
Doh. Will that always be associated with the current (displayed) company?


It will if the Link Master Fields and Link Child Fields properties of the
subform control have been properly set.
 
J

John W. Vinson

Hi,
I have a form with a subform -- company (form) / Product (subform). The
purpose of the form is to view a company's record, while also viewing the
company's products.

I would like to create a button that would allow me to be viewing the company
record, and then click the button to add a new product for the company.

This seems like it should be pretty simple but I only have basic VB
understanding. Could someone help me out with the code?

Thanks.

Ummm... you don't need ANY code at all. Just click the *> new record
navigation button in the subform. If this isn't working please explain more
about your form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top