subForm Problems

  • Thread starter Thread starter Martin Hopkins
  • Start date Start date
M

Martin Hopkins

Hello,

I have a personnel form listing certain data.

Some of he data is office duties which includes duty & date. This appears as
a subform of the personel form linked to staff number.

all worked well, until the database was expanded to other departments .

They also have duties & dutes but different. I have created another sub form
and amended the original, so that when say a record from my office staff is
called only the duties for this office appear and vice versa for other
offices.

My problem:

I still see the blank duty subform for the other office in my main form. Can
I change that so that no records matching for that sub form eg a diffrent
office, then the subform is not display.

thanks in adavance

Martin Hopkins
 
Martin,
If you are familiar with vba code, you can make your subforms conditionally
visible. You could also change the subform conditionally as well. Both
require code behind the form. Do you want to pursue that further?
 
Sam,

thanks for the information. I have set a condition if the value in the
suform is not the same as the main form

eg if not My Dept then My dept duties visible = False

If MyDept then My Dept visible = True

Tanks again.
 
Back
Top