New Record Button

jboomer

Registered User.
Local time
Yesterday, 21:55
Joined
Mar 6, 2008
Messages
25
I have created 2 tables (Meeting & Tasks) in the meeting table i have a record called Meeting tasks that references the id of the Tasks table.

I want to create a button that will create a new Task record in a new form and that it will be assigned to the current meeting.

Anyone got any ideas on how to do this?
 
It sounds like the Tasks table is the many side of a 1:m relationship with the Meeting table yet you have the relationship set up the other way. Do Meetings have Tasks or do Tasks have Meetings?
 
Relationship

There are Many tasks to one meeting.

baiscally when having a meeting tehere will be 3-5 tasks per meeintg.
 
That is what I thought in which case you are going to want the MeetingID in a ForeignKey field in Tasks table instead of how you have it. Then create a form based on the Meeting table and put a SubForm on it based on the Tasks table with the MeetingID as the LinkChild/MasterFields and no code is necessary. Access will fill in the ForeignKey when you add another record to the SubForm.
 
Assuming the MeetingID field in the Meeting table is an AutoNumber (which it should be!) then you simply need a MeetingID field in the Tasks table defined as a Long Integer. It is best to name each field the same in both tables. It saves confusion later on.
 

Users who are viewing this thread

Back
Top Bottom