Adding Record in form - Related Data from related tbl doesn't show

W

Whitey

Hi,
I have tblTenantInfo related to tblRentPayments as a one to many on UnitID
field. The form I created to enter rent payments has FirstName and LastName
fields from tblTenantInfo on it and when I enter a unit # in UnitID field of
tblRentInfo the first and last Names show up automatically from
tblTenantInfo, which is what I want so I have a visual check that the rent is
going to the correct tenant.
Problem - I created another form to enter and update current rent amount. I
have tblTenantInfo related to tblLeaseCharges as a one to one on UnitID
field. Obviously, each tenant only has one rent amount but the rent can
increase. When I enter a unit # in UnitID field of tblLeaseCharges the
related first and last name fields from tblTenantInfo remain blank. How can I
get the First and Last fields to show up automatically like they due in the
1st form I created?

Thanks for any reply - I am a self taught novice.
 
J

June7

How are you accomplishing the display of tenant info on the first form? Code
in Update Event of Unit# textbox? Sounds like the second form would duplicate
this event. VBA code or macros?
 
W

Whitey

All I did was drag the fields onto the blank form from tblLeaseCharges and
tbl TenantInfo. I had did the same thing with tblRentInfo and tblTenantInfo
which works. Access created the underlying SQL code which is similar in both
forms. Neither forms have any VBA nor macros in the event tab.
 
J

June7

No code or macros for the form but what about the objects on the form? I
don't see how there could not be for the first form. If the UnitID entry box
is bound to field in the table then entering a value should just change what
is in the table, not force the form to find and display related info. For
this you would need an unbound box with code/macro in its Update event
(actually some other events would also serve but this is simplest) which
would execute a filter of the recordset or requery the form's recordsource or
in the case of a new record automatically set the values of fields. With that
in mind, what is not happening on the new form makes more sense to me.
 
J

June7

W, Think the only way I could be of any help is to get my eyes and hands on
your project. If you want to try attaching the project in a zip folder to a
personal message or PM me with an email address I can respond to.
 
J

June7

Ooops, guess can't PM in this site. What the heck, my email is
(e-mail address removed).
 

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