I have 3 tables.
tbl_Notary
RefNo
Name
Surname
tbl_Volumes
VolID
RefNo
Volume
tbl_Contracts
ContractID
Date
Folios
ContractTypeID
Party1ID
Party2ID
VolumeID
tbl_Notary has a 1 to many relationship with tbl_Volumes with the ID RefNo. tbl_Volumes has a 1 to many relationship with tbl_Contracts with VolumeID
I have created 2 comboboxes on the frm_Main. cmb_Notary selects the Notary, cmb_Volume selects the Volume related to that Notary.
I want that after these 2 comboxes have been selected, a subform shows the contact details related to that volume of that notary. So far I have created a sfrm_Contract and afterUpdate for cmb_Volume I inserted the following code:
The sub form is not showing the related contracts. Any Idea what I am doing wrong please?
tbl_Notary
RefNo
Name
Surname
tbl_Volumes
VolID
RefNo
Volume
tbl_Contracts
ContractID
Date
Folios
ContractTypeID
Party1ID
Party2ID
VolumeID
tbl_Notary has a 1 to many relationship with tbl_Volumes with the ID RefNo. tbl_Volumes has a 1 to many relationship with tbl_Contracts with VolumeID
I have created 2 comboboxes on the frm_Main. cmb_Notary selects the Notary, cmb_Volume selects the Volume related to that Notary.
I want that after these 2 comboxes have been selected, a subform shows the contact details related to that volume of that notary. So far I have created a sfrm_Contract and afterUpdate for cmb_Volume I inserted the following code:
Code:
Private Sub cmb_Volume_AfterUpdate()
[Forms]![frm_Main]![sfrm_Contract].Form.Filter = "[VolumeID] = " & Me.cmb_Volume
End Sub
The sub form is not showing the related contracts. Any Idea what I am doing wrong please?
Last edited: