UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Form Filter problem    
 
   
bronisaurus
post Sep 22 2008, 08:36 AM
Post #1

New Member
Posts: 2



I have a main form Staff_names with primary key STAFFIDPK. There are 3 forms based on the table StaffSkills that are opened via a command button on Staff_names.

frmLang is one of these forms. When it is opened it's field staffidskill has its Default value as =[Forms]![frmStaff_names]![STAFFIDPK]. This sets the forms' filter to [staffidskill]=5 (for example).
There is a combobox using a query to show only the languages (about 10 items from a total of about 100 "skills". I also want the form to show only this persons' languages records (not skills that will be entered via the other 2 forms). If I use the Records-Advanced Filter option I can add the skilltypeid = 3 to the already existing filter of [staffidskill]=5 and this shows what I want. i.e. (((tblStaffSkills.staffidskill)=5) AND ((tblStaffSkills.skilltypeid)=3)) BUT I want to set this filter as an onOpen event of the form and I can't do this without it being bound to just one result e.g. staffidskill=5.

I was thinking something like
(([Forms]![frmStaff_names]![STAFFIDPK])=([Forms]![Langform]![staffidskill]) WHERE ([tblStaffSkills].[skilltypeid])=3) would be the sort of filter I could use for the form but this has incorrect syntax and I don't know how to write it properly or if it can be don this way. Any ideas?

P.S. full disclosure:I did post (a more poorly worded) version of this on another forum but it is down right now and I'm hoping to make some progress on this soon!
Go to the top of the page
 
+
bronisaurus
post Sep 22 2008, 11:06 AM
Post #2

New Member
Posts: 2



Is anyone able to help? I can't write and save a filter that does the whole job (as described above) and any filter I try to apply after the form is loaded that shows only skilltypeid =3 will work universally so all the records that are a language are shown and it is no longer limited to just that staff member.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 05:43 AM