Hi John,

Here is the source SQl:

The form isn't using a subform, but if you think tht would do it.
Please let me know.

Thanks
Joe


SELECT Client.TypeClient, PlacementHistory.PActiveFlag, 
Client.NonResProgram, Client.CurrentLocation, Client.GuardianAdress, 
Client.ClientID, Client.FirstName, Client.MiddleName, 
Client.LastName, Client.SSN, Client.DeemedCompetent, 
Client.MedicareNumber, Client.MedicaidNumber, 
Client.OtherHealthCareName, Client.OtherHealthCareNumber, 
Client.SSIIncome, Client.SSDIIncome, Client.GuardianYN, 
Client.RepPayeeYN, Client.RepGuardianSame, Client.GuardianFirstName, 
Client.GuardianMI, Client.GuardianLasttName, Client.GuardianCity, 
Client.GuardianState, Client.GuardianZip, Client.GuardianPhone, 
Client.RepPayeeFirstName, Client.RepPayeeMI, Client.RepPayeeLastName, 
Client.RepPayeeAdress, Client.RepPayeeCity, Client.RepPayeeState, 
Client.RepPayeeZip, Client.RepPayeePhone, 
Client.GuardianRelationship, Client.RepPayeeRelationship, 
Client.RepGuardianSame, PlacementHistory.[P-ClientID], 
PlacementHistory.[P-LocationCode], Client.TypeClient, Client.DOB, 
Client.Sex, Client.ClientAddress, Client.ClientCity, 
Client.ClientState, Client.ClientZipCode, Client.ClientHomePhone, 
Client.ClientWorkPhone, Client.ClientMobilePhone, 
Client.ClientEmailName, Client.ParentsNames, Client.ParentAddress, 
Client.ParentCity, Client.ParentClientState, Client.ParentZipCode, 
Client.ParentHomePhone, Client.ParentWorkPhone, 
Client.ParentMobilePhone, PlacementHistory.PStartDate, 
PlacementHistory.PEndDate, PlacementHistory.PExpectedEndDate
FROM Client INNER JOIN PlacementHistory ON Client.ClientID = 
PlacementHistory.[P-ClientID]
WHERE (((Client.TypeClient)=gettype()) AND 
((PlacementHistory.PActiveFlag)="A") AND ((Client.CurrentLocation)
=GETLOCATION())) OR (((PlacementHistory.PActiveFlag)="A") AND 
((Client.NonResProgram)=getlocation()));




--- In [email protected], "John Viescas" <[EMAIL PROTECTED]> wrote:
>
> Joe-
> 
> If you have a table into which you're adding records that has 
another table
> that could potentially have "many" related records, you should be 
using a
> subform for the second table - the Placement table.  You didn't 
tell me the
> structure of these two tables.  Also, what is the Record Source 
(the SQL if
> a query) of this form?
> 
> John Viescas, author
> "Building Microsoft Access Applications"
> "Microsoft Office Access 2003 Inside Out"
> "Running Microsoft Access 2000"
> "SQL Queries for Mere Mortals"
> http://www.viescas.com/
>  
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] 
On Behalf
> Of eliotchs
> Sent: Tuesday, January 17, 2006 2:33 PM
> To: [email protected]
> Subject: [ms_access] Re: Saving 2 records on a form?
> 
> Hi John
> 
> Thanks for getting back.
> 
> Here is what I have.
> * Client gets added.(Create Client table record)
> * Client also gets a Residental placement record added
(Placement     
> table record)
> * Some clients attend a "Day" program, so on the client add form 
they 
> choose the Day program they attend.
> 
> So when a client is added, if they have a day program, then they 
get 
> 2 placement records:
> 1 with the PlacementType(Res placement) = "R" and the "residetial" 
> placementcode say 250 for "Arlingon Residence"
> 1 with the placementtype(Non-Res) = "N" and the nonres placement 
code.
> The reason I believe I need two is clients can move in and out of 
Res 
> & Non-res placements changing there dates at the program.
> 
> Thanks
> Joe
> 
> 
> --- In [email protected], "John Viescas" <[EMAIL PROTECTED]> wrote:
> >
> > Joe-
> > 
> > Why do you want to do this?  What is the business problem you're 
> trying to
> > solve?  What is the structure and relationships of your tables?
> > 
> > John Viescas, author
> > "Building Microsoft Access Applications"
> > "Microsoft Office Access 2003 Inside Out"
> > "Running Microsoft Access 2000"
> > "SQL Queries for Mere Mortals"
> > http://www.viescas.com/
> >  
> > 
> > -----Original Message-----
> > From: [email protected] 
[mailto:[EMAIL PROTECTED] 
> On Behalf
> > Of eliotchs
> > Sent: Tuesday, January 17, 2006 10:30 AM
> > To: [email protected]
> > Subject: [ms_access] Saving 2 records on a form?
> > 
> > Hi,
> > 
> > I have a form which saves a record, with a command button.
> > Saving the "Recordtype" as "R". I would like to save a secord 
> record 
> > (If criteria is met) with a recordtype as "N"
> > 
> > Thanks in advance
> > 
> > Joe
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> >
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
>







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to