Visual Basic > Database SQL Stuff
Check record exist in master before opening transaction form
Check record exist in master before opening transaction form Public Function openfil(fn) Dim oprs As ADODB.Recordset Set oprs = New ADODB.Recordset SQL = "select * from " & fn oprs.Open SQL, DB, adOpenKeyset, adLockReadOnly If oprs.RecordCount <> 0 Then openfil = True Else msg = "No Records In " & fn & " First Enter That!!" MsgBox msg openfil = False End If End Function Call this function with master file name
Visual Basic Codes
ActiveX
Miscellaneous
Applications
Code Snippets
Common Dialogs
Special Effects
Database Stuff
Date Time
Files Drives
Forms
Graphics Games
Internet Stuff
Multimedia
Other
Strings
Windows