[AccessD] Many-To-Many

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Mon Mar 20 12:05:16 CST 2006


You're right from the programmer's view.  But from the user's view 
(according to the guy I'm designing this with - and since it's a 
preventive maintenance app and he's a preventive maintenance veteran, I 
have to go with his judgment) they select equipment and want to see a 
list of jobs associated with that piece. 

However, Shamil's elegant little trick solved the problem so I can go 
ahead and create the job in the subform and the keys all get resolved OK.

Otherwise the "New Job" modal popup form seems to be the consensus.

Rocky


Charlotte Foust wrote:
> Rocky,
>
> No matter how they look at it, that doesn't make a lot of sense when
> trying to create a new job.  Obviously, you can't see a new job for the
> equipment because they haven't created it yet.  If they insist on that
> arrangement, then you need a "New Job" button or something similar to do
> the necessary work in the background. 
>
>
> Charlotte Foust
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
> - Beach Access Software
> Sent: Sunday, March 19, 2006 10:57 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] MAny-To-May
>
> Martin:
>
> I actually had it that way - job in the header, equipment in the
> sub-form.  But we had to change the way the jobs are created because of
> the way the job is actually looked at by users.  You pick the equipment
> first now and see the list of jobs for that piece of equipment in the
> sub-form.
>
> Rocky
>
>
> Martin Reid wrote:
>   
>> Rocky
>>  
>> Would you not create the Job first and then the equipment required to
>>     
> do the job?
>   
>>  
>> Martin
>>  
>> Martin WP Reid
>> Training and Assessment Unit
>> Riddle Hall
>> Belfast
>>  
>> tel: 02890 974477
>>  
>>
>> ________________________________
>>
>> From: accessd-bounces at databaseadvisors.com on behalf of Rocky Smolin -
>>     
>
>   
>> Beach Access Software
>> Sent: Sun 19/03/2006 15:25
>> To: Access Developers discussion and problem solving
>> Subject: [AccessD] MAny-To-May
>>
>>
>>
>> Dear List:
>>
>> This is a preventive maintenance application.
>>
>> There is a table of Jobs and a table of Equipment. Since one job can 
>> do many equipments and one equipment can be called out in many jobs 
>> there is a table that sits between them - tblJobsEquipment which has 
>> the PK from tblJobs and the PK from tblEquipment as FKs.
>>
>> The equipment table is relatively static.  The job table changes all 
>> the time.
>>
>> On the form where jobs are created and maintained, the user selects 
>> the equipment from a combo box.  The jobs for that equipment are then 
>> displayed in a sub-form.
>>
>> The problem comes when trying to create a new job.  Since there's no 
>> PK yet for the job I get an error "cannot create record; join key (to 
>> the JobEquipment table) is not in the recordset.
>>
>> Indeed if I put a debug statement in the BeforeInsert event of the 
>> sub-form the PK of the Jobs table is still null.
>>
>> How does one work around this problem?
>>
>> MTIA
>>
>> Rocky
>>
>> --
>> Rocky Smolin
>> Beach Access Software
>> 858-259-4334
>> www.e-z-mrp.com
>>
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
>>
>>   
>>     
>
> --
> Rocky Smolin
> Beach Access Software
> 858-259-4334
> www.e-z-mrp.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>   

-- 
Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com




More information about the AccessD mailing list