Subform issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have tblRemodelInfo that holds info about all the remodel projects that
we've done in our stores. On tabbed FrmStoreInformation it displays static
information about the store (address, sqft, etc) and uses SubFrmRemodelInfo
and SubFrmCosts on separate tabs to display information about remodels and
their costs in a particular store.

The problem is that when a record is added to SubFrmRemodelInfo, you have to
leave the master record and return to it in order to be able to add the
associated costs in SubFrmCosts. I do NOT want to use a continuous subform
as we really like the tabbed layout, but is there a way to refresh the
record/form after entering new information?
 
Karen,
You'll have to Requery the Cost sub after editing the Remodel sub.
(Moving away from that record to another, and back, "forces" a Requery)
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Ok, I tried setting up a macro using Requery but got an error message because
I left the control field blank. (Per Access help, this should have forced a
requery of the underlying TblRemodelInfo) What am I doing wrong?
 
Karen,
Whenever you get an error message, please include that in your post.
Also, indicate on what event you placed your code.

I'm assuming that Remodel has a One to Many relationship with Costs...

Try this... after adding a new Remodel record...
Hit the F9 key... causing a Refresh. IF that doesn't "wake up" the Costs subform
(which should come up to a New Cost record, ready for your first Cost record against the
seected Remodel record)
Does that do what you want? (then I'll show you how to code up a simple Refresh...
very simple)

If not, I'll need more info on the key fields for the Main form, the Remodel sub, and
the Cost sub... and what are the Parent/Child relationships between those objects.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Back
Top