I got this function which is supposed to find a record based on the primary key, and then give three fields a value if they should be empty.
---------------------
Public Function DoesXrefExist(faPersonID As Long, faRoleCode As String, faDorpID As Long, faDorpCode As String)
If (DLookup("PersonID", "PEOPLE", "PersonID =" & faPersonID) > 0) Then
... blah blah
End Function
-----------------------------------------
Thats as far as i have got...for the next part
I get the feeling that i need to use the recordset object that exists somewhere.
How do i access that recordset object? I have not been using any DAO or ADO, just straight VBA. I know i can create recordsets and stuff using DAO/ADO, but there must be a recordset that has been created already by the Dlookup command...
---------------------
Public Function DoesXrefExist(faPersonID As Long, faRoleCode As String, faDorpID As Long, faDorpCode As String)
If (DLookup("PersonID", "PEOPLE", "PersonID =" & faPersonID) > 0) Then
... blah blah
End Function
-----------------------------------------
Thats as far as i have got...for the next part
I get the feeling that i need to use the recordset object that exists somewhere.
How do i access that recordset object? I have not been using any DAO or ADO, just straight VBA. I know i can create recordsets and stuff using DAO/ADO, but there must be a recordset that has been created already by the Dlookup command...