Hello,
I'm using DMax function on my form frmReportAdd to reset ReportPartialNo for every new project in tblReports. Function I used is:
Now I created a Navigation Form frmRMS and on the first tab (named as HomeButton) of navigation form, I used form frmReportAdd on which I'm using aforementioned DMax function. Now after navigation form, Dmax is not working. I don't work. Every time it gives the same number (i.e. 01). I searched this forum and found this link and tried the code but neither worked.
And
I also tried to make code by using instructions on Access MVPS this page but that didn't work either. Now the code don't run and gives error. Please help me fix this, I'm stuck here.
PS. I'm using Microsoft Access 2016.
Best Regards,
Abdullah
I'm using DMax function on my form frmReportAdd to reset ReportPartialNo for every new project in tblReports. Function I used is:
Code:
[ReportPartialNo] = Nz(DMax("[ReportPartialNo]", "tblReports", "[ProjectCode]=[Forms]![frmReportAdd]![ProjectCode]"), 0) + 1
Now I created a Navigation Form frmRMS and on the first tab (named as HomeButton) of navigation form, I used form frmReportAdd on which I'm using aforementioned DMax function. Now after navigation form, Dmax is not working. I don't work. Every time it gives the same number (i.e. 01). I searched this forum and found this link and tried the code but neither worked.
Code:
[ReportPartialNo] = Nz(DMax("[ReportPartialNo]", "tblReports", "[ProjectCode]=[Forms]![frmRMS].[Form].[Controls]![frmReportAdd].[Form].[ProjectCode]"), 0) + 1
And
Code:
[ReportPartialNo] = Nz(DMax("[ReportPartialNo]", "tblReports", "[ProjectCode]=[Forms]![frmRMS]![HomeButton].[Controls].[Form]![frmReportAdd].[Controls].[ProjectCode]"), 0) + 1
I also tried to make code by using instructions on Access MVPS this page but that didn't work either. Now the code don't run and gives error. Please help me fix this, I'm stuck here.
PS. I'm using Microsoft Access 2016.
Best Regards,
Abdullah
Last edited: