DonkeyKong
Registered User.
- Local time
- Today, 14:57
- Joined
- Jan 24, 2013
- Messages
- 61
I have this little ditty that I would reallly like to work. I'm actually copying this from an existing database and trying to get it to work for mine. So far I have had absolutely no luck. The other db used a query, I am using VB. I don't know what I am doing wrong. All the objects are valid. Do I need to do something with the relationships between tables? Please help!
Code:
strSQL = "SELECT [Principal.Cusip], [Interest.[Payable Date]], [Interest.Interest]," & _
"[Principal.Principal], [Interest.Interest]+[Principal.Principal] AS Total, [DTC Amounts Paid]" & _
"FROM Interest INNER JOIN Principal ON [Interest.Cusip] = [Principal.Cusip]" & _
"WHERE ((([Principal.Cusip]) Is Not Null))"
CurrentDb.Execute strSQL, dbFailOnError