I am using the following code which is working fine but I need something added to it but I can't seem to get it to work.
Private Sub txtPage_Ln_AfterUpdate()
If DLookup("Page_Ln", "tblPhysicalEnter", "Page_Ln = '" & txtPage_Ln & "'" Then
MsgBox "Warning - Page & line number already exists", vbInformation
Me.txtPageNo.SetFocus
Me.txtPage_Ln.SetFocus
SendKeys ("End"
End If
End Sub
I want it to also check for null values and give a message box. I have also broken down the page_ln into two unbound fields - pageno and lineno. I also need something included that will check the pageno and let me if it's greater than 600 and the lineno is greater than 26.
Private Sub txtPage_Ln_AfterUpdate()
If DLookup("Page_Ln", "tblPhysicalEnter", "Page_Ln = '" & txtPage_Ln & "'" Then
MsgBox "Warning - Page & line number already exists", vbInformation
Me.txtPageNo.SetFocus
Me.txtPage_Ln.SetFocus
SendKeys ("End"
End If
End Sub
I want it to also check for null values and give a message box. I have also broken down the page_ln into two unbound fields - pageno and lineno. I also need something included that will check the pageno and let me if it's greater than 600 and the lineno is greater than 26.