Combo box

C

Chrissy

Hello. I hope someone can help me.

I have a form of clients (form1), on which is a command
button to open a form to make a receivables payment onto
(form2). I would like to know how to link form2 to form1
for a selected client and show their invoices in a combo
box to select one.

I have used stLinkCriteria in some cases, but using only
that here merely populates the form2 with that client. My
user needs to select from among that client's invoices
(via combo box?).

Also, form2 contains invoice data from one table and
receipts data (multiples applied to one invoice) from
another. My form2 source query joins these two tables
showing all invoices and all payments. What should form2
be data entry with edits or should the payment receipts
data enter via a subform?

Any help....
Thanks,
Chrissy
 
C

Casey

Chrissy,

If the selected Client is a common field between the
main form and the subform, you can use the add subform
wizard option at the top of your view design screen to add
the subform to your form (make sure to mention during
using the wizard that you want the main form and subform
to be linked via the common field you are interested in.

If you want to use the Client as a common field
between your main form and your subform being called by a
button then you should base your subform on a query that
is base on the current record Client box on your main form.

In the field being queried, of the query that is being
used as a source for your subform, in the criteria area of
that field place something like the following to refer to
the entry text box on your main form.

[Forms].[mainformname].[client]

Type the [Forms] part in just the way it is, then
type in the name of your main form as above instead of the
mainformname I used, then type in the name of the box that
uses client as a source on your main form. I used client
in the above example, assuming that you named that field
box client.

Now make sure that the query is the source of your
subform being called. You can have your button open the
subform if you would like. In your button properties you
will use a macro for the onclick property of that button,
and you will have your macro use the openform action to
open the subform. The subform will then show the records
that are related to your client field of the current
record of your main form when the button is clicked.

It sounds like your form2 should be alright as data
entry if you want just entries made by the user, if you
want edits also, then allow edits and don't restrict the
user to just the data entry.

I hope I gave you a good amount of information to at
least get you on the right track. The method works.

I hope I was of some help.

Have a nice weekend.

Bye,

Casey
 
C

Chrissy

Thanks, I'll try it.

-----Original Message-----
Chrissy,

If the selected Client is a common field between the
main form and the subform, you can use the add subform
wizard option at the top of your view design screen to add
the subform to your form (make sure to mention during
using the wizard that you want the main form and subform
to be linked via the common field you are interested in.

If you want to use the Client as a common field
between your main form and your subform being called by a
button then you should base your subform on a query that
is base on the current record Client box on your main form.

In the field being queried, of the query that is being
used as a source for your subform, in the criteria area of
that field place something like the following to refer to
the entry text box on your main form.

[Forms].[mainformname].[client]

Type the [Forms] part in just the way it is, then
type in the name of your main form as above instead of the
mainformname I used, then type in the name of the box that
uses client as a source on your main form. I used client
in the above example, assuming that you named that field
box client.

Now make sure that the query is the source of your
subform being called. You can have your button open the
subform if you would like. In your button properties you
will use a macro for the onclick property of that button,
and you will have your macro use the openform action to
open the subform. The subform will then show the records
that are related to your client field of the current
record of your main form when the button is clicked.

It sounds like your form2 should be alright as data
entry if you want just entries made by the user, if you
want edits also, then allow edits and don't restrict the
user to just the data entry.

I hope I gave you a good amount of information to at
least get you on the right track. The method works.

I hope I was of some help.

Have a nice weekend.

Bye,

Casey
-----Original Message-----
Hello. I hope someone can help me.

I have a form of clients (form1), on which is a command
button to open a form to make a receivables payment onto
(form2). I would like to know how to link form2 to form1
for a selected client and show their invoices in a combo
box to select one.

I have used stLinkCriteria in some cases, but using only
that here merely populates the form2 with that client. My
user needs to select from among that client's invoices
(via combo box?).

Also, form2 contains invoice data from one table and
receipts data (multiples applied to one invoice) from
another. My form2 source query joins these two tables
showing all invoices and all payments. What should form2
be data entry with edits or should the payment receipts
data enter via a subform?

Any help....
Thanks,
Chrissy
.
.
 

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

Similar Threads

Filtering Combo Box from another form 2
search 5
clear combo box selection 3
Combo Box 12
Pass value from Form2 to Form1 1
How To make a subform uneditable/editable. 4
Arrays 2
How to remove a filter 7

Top