Form and Subform from same table?

kbrooks

Still learning
Local time
Today, 12:30
Joined
May 15, 2001
Messages
202
Does the information on your main form and the information on a subform have to be on separate tables??

I have a database that will track applicants to our financial assistance program, as well as their account information. Each applicant could have many accounts.

I DID have everything on one table but had problems with the form and subform so I split them into two tables.....applicant data on one and account data on another one. It makes more sense since each applicant will have many accounts, I guess.

But now that they're on 2 tables I'm having a different problem. I have 2 fields that aren't in the table at all, they're based on calculations. They worked fine when everything was all in one table but now that they're split one doesn't work because one field in the calculation is in one table and one in the other. I have tried

fap_payment:[account_balance]*[percentage]/100
and also
fap_payment:[account_balance]*[ApplicantData]![percentage]/100
but I am prompted to enter the percentage each time.

I guess that's really 3 questions....can I do a form and subform from one table....does it make more sense to have two tables....and can I do a calculation from fields in different tables.

Thanks in advance!!
 
I know exactly what's going on. You've got a calculated textbox on the main form that uses data on the subform, correct?

If that's the case when you refer to the field in the subform you have to make it aware that it's in the subform. Example:

Calculated textbox is named txtCalculate
Subform textbox is named txtData
Subform is named sfrmData

txtCalculate=[sfrmData].Form![txtData]

Trying making all the necessary changes with that and let me know if it works.
 
FYI I found this chart on the web that breaks down the syntax for referring to subforms from forms, forms from subforms, etc. It made me think of your question.

Here it is for your use.
 

Attachments

Thank you

Rob,

Have been looking for a list like that for some time. It has solved a few of my major problems within forms and sub forms.

Thank you

Steve
 

Users who are viewing this thread

Back
Top Bottom