I have searched all my books, Help, and these newsgroups for an example of how to do this, and I'm now more confused than ever. I just know there's someone out there that knows alot more than me. I have the following for a group that does business with companies who tend to change their names alot:
tblCompany CompanyID (PK, Autonum), OriginalDateEntered (abbreviated in the field!)
trelCompAcct CompID (LongInt), AcctNumID (LongInt)
tblCompAcctNum AcctNumID (PK, Autonum), AcctNum (text, alphanumeric & assigned by Comp)
trelCompName CompID (LongInt), NameID (LongInt)
tblCompName NameID (PK, Autonum), CompName (text)
trelCompAddr CompID (LongInt), AddrID (LongInt)
tblCompAddr AddrID (PK, Autonum), AddrLineOne, etc.
The Main frm is from tblComp. Subforms (CompName, CompAcctNum, CompAddr) are based on queries joining the trel to the related tbls. Master/Child links are to CompID. The main frm/fsub work great if you start by filling in the original date that this company was entered. But if you try to enter data into one of the subforms first, you can't because the CompID has obviously not been generated yet. I am lousy at vba, but I know there must be some event that will cause that main frm to generate its id on enter into a fsub. Can anyone point me to an example or coach me in the best way to do this? Greatly appreciate all suggestions.
tblCompany CompanyID (PK, Autonum), OriginalDateEntered (abbreviated in the field!)
trelCompAcct CompID (LongInt), AcctNumID (LongInt)
tblCompAcctNum AcctNumID (PK, Autonum), AcctNum (text, alphanumeric & assigned by Comp)
trelCompName CompID (LongInt), NameID (LongInt)
tblCompName NameID (PK, Autonum), CompName (text)
trelCompAddr CompID (LongInt), AddrID (LongInt)
tblCompAddr AddrID (PK, Autonum), AddrLineOne, etc.
The Main frm is from tblComp. Subforms (CompName, CompAcctNum, CompAddr) are based on queries joining the trel to the related tbls. Master/Child links are to CompID. The main frm/fsub work great if you start by filling in the original date that this company was entered. But if you try to enter data into one of the subforms first, you can't because the CompID has obviously not been generated yet. I am lousy at vba, but I know there must be some event that will cause that main frm to generate its id on enter into a fsub. Can anyone point me to an example or coach me in the best way to do this? Greatly appreciate all suggestions.