Add a Subform Field to a Form for Entry?

B

Brook

I have an invoice form that I use for order entry, along with a
productsubform and a payment subform.

Within my invoicepayment subform I have a field for a Deposit Date and
Deposit amt which is only entered once, how can I add this subform field to
my main invoice form for initial entry?

Please let me know if you have any questions...

Brook
 
T

tina

well, assuming you mean that the DepositDate and DepositAmt fields are part
of the table bound to the subform - but you want to enter those values only
once, in the main form, and use the entered values as default values to
populate the DepositDate and Deposit Amt fields in the subform:

add two unbound textbox controls to the main form. i'll call them
txtDepositDate and txtDepositAmt.

in the subform, set the DefaultValue of the DepositDate control to
=Forms!MainFormName!txtDepositDate
and the DepositAmt control to
=Forms!MainFormName!txtDepositAmt

hth
 
B

Brook

Tina,

thank you for the response... I added my two unbound textcontrls to my main
form, but when I go to my subform, I don't see where i add the Default Value?

Brook
 
T

tina

do you have controls in the subform that are bound to those two fields in
the underlying table? if so, select each control in turn, and in the
Properties box, add the expression in the DefaultValue property.

hth
 
B

Brook

Tina,

Thank you for the information, and I was able to get it working properly.
However, I do have another question. How do I set it up to distinquise from
each invoince? Because the way that it is set up now with the code you
provided me, when I enter a date and value it appears on each of my new &
old invoices. Also, is there a way that I can save this information to my
tblpayments as my depositdate and deposit amt?

Thanks so much,

Brook
 
T

tina

in the subform textbox controls, did you put those expressions in the
*DefaultValue* property - or in the *ControlSource* property? in each
control, the expression must go in the DefaultValue property, and the
ControlSource property must be the name of the appropriate field in the
subform's underlying table.

hth
 
B

Brook

Hello,

I just double checked my subform, and the expressions are in the Default
Value of the control, and the control source is the name of the field in my
table.

Any suggestions?

Brook
 
B

Brook

Tina,

Since my invoice/payment deposit only occurs once, should that subform
field be in the form details or form footer?

thanks,

Brook
 
T

tina

let's back up a minute. what table is bound to your invoice form? what table
is bound to your invoice payment subform? what are the names and structures
of those two tables, and how are they related?
 
Top