Sorry if the title doesnt make any sense but im really struggling with this one! I don't have extensive knowledge of Microsoft Access and everything I have learnt is self taught so go easy with me.
I have a database with the 2 main tables; tblContracts and tblEvents. It is linked with the primary key- ID in tblContracts to ContractID in tblEvents so its one one to many relationship.
I have 3 main forms, frmContactDetails, frmEvent subform and frmEvent. the frmContactDetails is my main point of call and has to 2tabs, 1 which has all the general information of the contract and another tab that shows all the events for that contract. This comes from a subforms (frmEvent subform) and is just a basically summary of any events for that site in datasheet view. I added a button that allows you to open that record, or create a new record and opens the form frmEvent as here you can enter more details.
If an event has already been created its fine because the ContractID already links to that tblContract. However when you click new and are presented with the frmEvent, the field for ContractID is blank, meaning it doesnt link to that contracts record.
I have an open form macro with a where condition to take it to the specific record, I wonder if this is where it needs to be sorted out.
I have attached some images so if anyone has any advice that would be great.
Thanks,
Jamie