467,161 Members | 854 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

Object doesn't support this property or method occuring beacuse of Query why?

after doing the select statement as you asked me to, that is to put distinct, the error above has started reoccuring again. 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 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.  
Nov 17 '06 #1
  • viewed: 1198
Share:
2 Replies
sashi
Expert 1GB
after doing the select statement as you asked me to, that is to put distinct, the error above has started reoccuring again. 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 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.  
Hi there,

Please provide the SQL statement used, as it would ease in providing solutions. Good luck & Take care.
Nov 17 '06 #2
Hi there,

Please provide the SQL statement used, as it would ease in providing solutions. Good luck & Take care.
the SQl statement used is

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.  
Nov 17 '06 #3

Post your reply

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

Similar topics

5 posts views Thread by Michael Moreno | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.