By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,554 Members | 1,146 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,554 IT Pros & Developers. It's quick & easy.

How do you connect a Query to Data control

P: 62
After writting the select statement below using the word Distinct the error Object doesn't support this property or method started appearing. I did a check by removing the data connection to this query and the error did not occur, how can I resolve this?
this is the select statement

Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT  
  2. H_DUTY_PER.H_DUTY_PER_ISST, 
  3. H_DUTY_PER.H_DUTY_PER_EXPT, 
  4. H_PER.H_PER_ISST, 
  5. H_PER.H_PER_EXPT, 
  6. INS_CERT.INS_CERT_ISST, 
  7. INS_CERT.INS_CERT_EXPT, 
  8. MOB_ADV.MOB_ADV_ISST, 
  9. MOB_ADV.MOB_ADV_EXPT, 
  10. RD_WORTH.RD_WORTH_ISST, 
  11. RD_WORTH.RD_WORTH_EXPT, 
  12. VEH_DESCRIPTION.VEHICLE_NO, 
  13. VEH_DESCRIPTION.ENGINE_NO, 
  14. VEH_DESCRIPTION.CHASIS_NO, 
  15. VEH_LIC.VEH_LIC_ISST, 
  16. VEH_LIC.VEH_LIC_EXPT, 
  17. VEH_TYPE.VEHICLE_TYPE
  18. FROM  
  19. H_DUTY_PER , 
  20. H_PER, INS_CERT, 
  21. MOB_ADV, 
  22. RD_WORTH, 
  23. VEH_DESCRIPTION, 
  24. VEH_LIC, VEH_TYPE
  25. WHERE
  26.  VEH_DESCRIPTION.VEHICLE_ID=VEH_TYPE.VEHICLE_ID And VEH_DESCRIPTION.VEHICLE_NO=VEH_LIC.VEHICLE_NO AND VEH_DESCRIPTION.VEHICLE_NO=H_DUTY_PER.VEHICLE_NO AND VEH_DESCRIPTION.VEHICLE_NO=H_PER.VEHICLE_NO AND VEH_DESCRIPTION.VEHICLE_NO=INS_CERT.VEHICLE_NO AND VEH_DESCRIPTION.VEHICLE_NO=MOB_ADV.VEHICLE_NO AND VEH_DESCRIPTION.VEHICLE_NO=RD_WORTH.VEHICLE_NO; 
  27.  
and this is how i did the join using visual basic to the Access Database

Expand|Select|Wrap|Line Numbers
  1. DVehQry.DatabaseName = App.Path & "\VEHICLE_TRACKER.mdb"
  2. DVehQry.RecordSource = "VEH_QRY"
  3.  
then to the various text box that would display the data in the field of the Db, i used this code

Expand|Select|Wrap|Line Numbers
  1. Text1(3).DataField = "VEHICLE_TYPE"
  2.     Text1(6).DataField = "VEHICLE_NO"
  3.     Text1(4).DataField = "ENGINE_NO"
  4.     Text1(5).DataField = "CHASIS_NO"
  5.     Text2(0).DataField = "VEH_LIC_ISST"
  6.     Text2(1).DataField = "VEH_LIC_EXPT"
  7.     Text2(2).DataField = "H_PER_ISST"
  8.     Text2(3).DataField = "H_PER_EXPT"
  9.     Text2(4).DataField = "RD_WORTH_ISST"
  10.     Text2(5).DataField = "RD_WORTH_EXPT"
  11.     Text2(6).DataField = "INS_CERT_ISST"
  12.     Text2(7).DataField = "INS_CERT_EXPT"
  13.     Text2(8).DataField = "MOB_ADV_ISST"
  14.     Text2(9).DataField = "MOB_ADV_EXPT"
  15.     Text2(10).DataField = "H_DUTY_PER_ISST"
  16.     Text2(11).DataField = "H_DUTY_PER_EXPT" 
  17.  
.
Please how do i resolve this issue
Nov 17 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.