hi
i have main table called tblseries and sub table called tblseason and they have relation between both, i made a form from the main table and in the same form is shows the sub form on the left,
this form has button if i press it, it copy the data from main record and put it as new record in the sub form (sub table), which related to the main record,
from series_name to season_name.
main table : tbleseries
filed : series_name
sub table: tbleseason
filed :season_name
and i wrote this code.
do you think it is good? or there is more professional code ?
i appreciate any help
i have main table called tblseries and sub table called tblseason and they have relation between both, i made a form from the main table and in the same form is shows the sub form on the left,
this form has button if i press it, it copy the data from main record and put it as new record in the sub form (sub table), which related to the main record,
from series_name to season_name.
main table : tbleseries
filed : series_name
sub table: tbleseason
filed :season_name
and i wrote this code.
Code:
Private Sub Command17_Click()
If tblseason_Subform.Form.Dirty Then
tblseason_Subform.Form.Dirty = False
End If
tblseason_Subform.SetFocus
DoCmd.GoToRecord , , acNewRec
[tblseason_Subform].[Form].[season_name] = Form_tblemain.series_name.Value
End Sub
do you think it is good? or there is more professional code ?
i appreciate any help