Senin, 29 Juni 2015

Re: [MS_AccessPros] Question on form data source

 

Rod-


I'm assuming you want to apply a filter on userid when you open the form.  You can do it one of two ways:

1) Apply a filter like this:

   lngTaxPayerID IN (SELECT lngTaxPayerID FROM tblprojects WHERE userid = <substitute userid no here>)

2) Use a query on both tbltaxpayer and tblprojects and apply the filter on the userid in tblprojects.  You should still be able to update the tbltaxpayer fields.

I personally prefer the first method because it makes it clear what you are doing.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Jun 28, 2015, at 11:52 PM, desertscroller@cox.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

I have a form (frmTaxPayerDialog) which has a parent plus 7 subforms.  The issue is the client wants one of the parent controls moved to one of the subforms but still filter the data on the parent using the moved control.  The parent  and the subforms have a field (lngTaxpayerID) in common.  The field moved was the userid.  The userid needs to be part of the project subform (tblprojects) verses the main taxpayer form (tbltaxpayer).  Originally the userid (database user) was assigned based on the taxpayer but now several user working on different projects need access to the taxpayer.  My question is if changing the parent form data source from the tbltaxpayer to a query which links the data from the tblproject (userid field) to the tbltaxpayer still update the fields in the tbltaxpayer when moving to a different record on the form.  The userid will not be listed on the parent form only on the projects form.

The main reason is to limit the user to those taxpayers associated with the user's projects.  Multiple users may be process taxpayers for a given project.

Hope I presented the issue clearly.  Using Win 7 & 8.1 with Access 2010.

Rod



__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar