B
bw
My Table tblModules has...
an AddrID field where duplicates are ok.
a MonicsID field where duplicates are ok.
The main form (frmModules) links to the sub form (frmModulesSubForm1) where Child
and Master Fields are AddrID.
All of the following displays tell me all references in them are correct.
MsgBox "Parent Name is " & Me.Parent.Name
MsgBox "SubForm Name is " & Form.Name
MsgBox "Current AddrID is " & Me.Parent.AddrID
MsgBox "Current MonicsID is " & Me.Parent.frmModulesSubForm1.Form.Mnemonic
MsgBox "tblModules MonicsID is " & DLookup("MonicsID", "tblModules", "[Mnemonic]
='ADS'")
So my question is, how do I use DLOOKUP to determine if there are duplicate records
in tblModules, when for each AddrID, there can be many MonicsID values, some of
which may be duplicates? Since we have to "look" at both the AdddrID field, and the
MonicsID field I don't know how to modify code as below, to accomplish this.
X = DLookup("[MonicsID]", "tblModules", "[Mnemonic]='ADS'")
is what I want, but it doesn't take into account the value of AddrID.
Thanks for whatever help you can provide.
Bernie
an AddrID field where duplicates are ok.
a MonicsID field where duplicates are ok.
The main form (frmModules) links to the sub form (frmModulesSubForm1) where Child
and Master Fields are AddrID.
All of the following displays tell me all references in them are correct.
MsgBox "Parent Name is " & Me.Parent.Name
MsgBox "SubForm Name is " & Form.Name
MsgBox "Current AddrID is " & Me.Parent.AddrID
MsgBox "Current MonicsID is " & Me.Parent.frmModulesSubForm1.Form.Mnemonic
MsgBox "tblModules MonicsID is " & DLookup("MonicsID", "tblModules", "[Mnemonic]
='ADS'")
So my question is, how do I use DLOOKUP to determine if there are duplicate records
in tblModules, when for each AddrID, there can be many MonicsID values, some of
which may be duplicates? Since we have to "look" at both the AdddrID field, and the
MonicsID field I don't know how to modify code as below, to accomplish this.
X = DLookup("[MonicsID]", "tblModules", "[Mnemonic]='ADS'")
is what I want, but it doesn't take into account the value of AddrID.
Thanks for whatever help you can provide.
Bernie