Hi there,
I have a parent form (frm_TelesalesContact) with a datasheet subform (frm_subform_TelesalesContact). The dialog form (frm_dialog_IndividualContact) pops up on the specific record double clicked on within the subform.
However when you double click on a new record in the subform the dialog pops up entirely blank (not even empty fields are showing). In this instance I would lik the dialog form to create th new record and autofill the contents with the info from the subform. Can and how can this be done?
The fields that I want to autofill are:
CustCode
DelSeqCode
ContactDate
ContactTime
The current coding I have o the double click event procedure for the CustCode field in the subform is:
**
Private Sub CustCode_DblClick(Cancel As Integer)
DoCmd.OpenForm "frm_dialog_IndividualContact", acNormal, , "[CustCode]='" & Me.[CustCode] & "' And [DelSeqCode]='" & Me.[DelSeqCode] & "' And [ContactDate]=#" & Me.[ContactDate] & "# And [ContactTime]=#" & Me.[ContactTime] & "#", , acDialog
End Sub
**
I just had a thought that one way round it could perhaps be a new record button. Though how/where I would/could display this I don't know. Can you diplay buttons on a datasheet subform or would it need to be displayedon the main form? How would you code a button like that?
Please let me know if anymore information is required.
Thank you in advance for your assistance.
Jodie
I have a parent form (frm_TelesalesContact) with a datasheet subform (frm_subform_TelesalesContact). The dialog form (frm_dialog_IndividualContact) pops up on the specific record double clicked on within the subform.
However when you double click on a new record in the subform the dialog pops up entirely blank (not even empty fields are showing). In this instance I would lik the dialog form to create th new record and autofill the contents with the info from the subform. Can and how can this be done?
The fields that I want to autofill are:
CustCode
DelSeqCode
ContactDate
ContactTime
The current coding I have o the double click event procedure for the CustCode field in the subform is:
**
Private Sub CustCode_DblClick(Cancel As Integer)
DoCmd.OpenForm "frm_dialog_IndividualContact", acNormal, , "[CustCode]='" & Me.[CustCode] & "' And [DelSeqCode]='" & Me.[DelSeqCode] & "' And [ContactDate]=#" & Me.[ContactDate] & "# And [ContactTime]=#" & Me.[ContactTime] & "#", , acDialog
End Sub
**
I just had a thought that one way round it could perhaps be a new record button. Though how/where I would/could display this I don't know. Can you diplay buttons on a datasheet subform or would it need to be displayedon the main form? How would you code a button like that?
Please let me know if anymore information is required.
Thank you in advance for your assistance.
Jodie
Last edited: