R
rwilliams616
Hi I have the following code:
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.FileNo = Nz(DMax("[FileNo]", "tblFiles", "[LogNo] = " & Me.LogNo)) + 1
End Sub
I get the run-time error for the '[LogNo] = ' portion of the code. LogNo is
a primary key in a table called tblFRACAS. LogNo is also used in tblFiles.
LogNo is linked in a one-to-many relationship between tblFRACAS and tblFiles.
It is an integer in each of the tables.
This code is being used in a subform called frmFiles. The main form is
called frmFRACAS.
Can anyone offer any help?
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.FileNo = Nz(DMax("[FileNo]", "tblFiles", "[LogNo] = " & Me.LogNo)) + 1
End Sub
I get the run-time error for the '[LogNo] = ' portion of the code. LogNo is
a primary key in a table called tblFRACAS. LogNo is also used in tblFiles.
LogNo is linked in a one-to-many relationship between tblFRACAS and tblFiles.
It is an integer in each of the tables.
This code is being used in a subform called frmFiles. The main form is
called frmFRACAS.
Can anyone offer any help?