Subform Control

G

Guest

Hi,

I have designed a database for members of our organisation with tables,
queries, forms, subforms, graphs etc. Our members are independent and we
have no say over their IT systems and so i need the database to work on
Access 2000, 2003, 2007.

I wrote the original in Access 2000 (lowest common denominator) and i am now
testing it in 2007 and 2003 to get them to work. After a few issues, i now
have it working fine in 2007 but have a really strange issue in 2003.

I have a main form (frmCompany) with a subform (frmStaff), they link
together and show the right staff with the right company.

I then have other forms that have a query as their source, with a criteria
on StaffID, to bring up on the data for that staff member, i.e. the criteria
is [Forms]![frmCompany]![frmStaff]![StaffID] and then when the user presses a
button on the subform, it opens another form just containing the data for the
staffid selected.

This works fine in 2000 & 2007 but when i open it in 2003 the forms just
come up blank as do the queries (ie the criteria isn't working) and there has
been no change whatsoever from when i opened it in 2000 or 2007.

I checked the help and it seems to say i am doing it right, also i remade
the query just in case and it didn't help.

Please can some one help me out of this jam, i have wasted a whole day on it
so far.

Thanks
 
G

Guest

Hi Emma

Try using just

Forms![FormName]![ControlName]
Filter the main form to give the criteria (staffID) and then link the
subform (which you have already done)

This looks like you are trying to filter a subform - which will not work if
it linked to the mainform with another staffID
[Forms]![frmCompany]![frmStaff]![StaffID]
 
G

Guest

I knew it must be something simple as the help files agreed i was doing the
right thing. I copied and pasted the form over itself & it worked, no idea
why.

By the way, i was talking about filtering completely separate forms by the
value of a control on my subform, not the subform itself.



Wayne-I-M said:
Hi Emma

Try using just

Forms![FormName]![ControlName]
Filter the main form to give the criteria (staffID) and then link the
subform (which you have already done)

This looks like you are trying to filter a subform - which will not work if
it linked to the mainform with another staffID
[Forms]![frmCompany]![frmStaff]![StaffID]


--
Wayne
Manchester, England.



Emma Hope said:
Hi,

I have designed a database for members of our organisation with tables,
queries, forms, subforms, graphs etc. Our members are independent and we
have no say over their IT systems and so i need the database to work on
Access 2000, 2003, 2007.

I wrote the original in Access 2000 (lowest common denominator) and i am now
testing it in 2007 and 2003 to get them to work. After a few issues, i now
have it working fine in 2007 but have a really strange issue in 2003.

I have a main form (frmCompany) with a subform (frmStaff), they link
together and show the right staff with the right company.

I then have other forms that have a query as their source, with a criteria
on StaffID, to bring up on the data for that staff member, i.e. the criteria
is [Forms]![frmCompany]![frmStaff]![StaffID] and then when the user presses a
button on the subform, it opens another form just containing the data for the
staffid selected.

This works fine in 2000 & 2007 but when i open it in 2003 the forms just
come up blank as do the queries (ie the criteria isn't working) and there has
been no change whatsoever from when i opened it in 2000 or 2007.

I checked the help and it seems to say i am doing it right, also i remade
the query just in case and it didn't help.

Please can some one help me out of this jam, i have wasted a whole day on it
so far.

Thanks
 

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