![]() |
|
||||||||
| Site Links |
| Consulting |
| Knowledge Base |
| Training |
| Forum |
| Articles |
| Resources |
| Products |
| Cool Tools |
| Contact |
| About Us |
| Go to Page... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
|
Copying Caption to Description
Hello.
Iīm creating a VB app. to manipulate an Access database. The database has no form and no user interface. This is done by VB app. I need to get the field/column Captions from each table defined in database but they are not available to ADO/ADOX. One solution is to copy them to Description property since this one is available to ADO/ADOX. The problem is how to do it. Also, it needs to be done everytime the database is opened by VB app. (other developers here may change the captions and forget to warn). I think some VBA code will solve this, but I donīt have any idea how to do it. Please, can you help? Thanks. |
|
Local Time: 09:09 PM
Local Date: 05-20-2013 |
|
|
|
#2 |
|
|
Try this to get column details in Access
VBA:
VBA tags courtesy of www.thecodenet.com
|
|
Local Time: 10:39 AM
Local Date: 05-21-2013 Location:
|
|
|
|
#3 | |||||||||||||||||||||||
|
|
Sorry, this code is not a solution to this problem. Caption property is not available to Jet. If so I could get it uising my VB app. Only Description is available. Thatīs why I need to copy Captions to Descriptions. Any idea? |
|||||||||||||||||||||||
|
Local Time: 09:09 PM
Local Date: 05-20-2013 |
|
|
|
#4 |
|
|
Use DAO instead of ADO
VBA:
VBA tags courtesy of www.thecodenet.com
|
|
Local Time: 10:39 AM
Local Date: 05-21-2013 Location:
|
|
|
|
#5 | |||||||||||||||||||||||
|
|
Perfect!!! I canīt believe this is not available in ADO/ADOX. Do you know how to get a list of tables using DAO? One more question: is there any problem using DAO and ADO/ADOX in the same app in VB? Thanks. Last edited by jalexm : 03-07-2012 at 09:46 AM. |
|||||||||||||||||||||||
|
Local Time: 09:09 PM
Local Date: 05-20-2013 |
|
|
|
#6 |
|
|
To get list of tables
VBA:
VBA tags courtesy of www.thecodenet.com
i think no problem comes if using DAO - ADO - ADOX on same application |
|
Local Time: 10:39 AM
Local Date: 05-21-2013 Location:
|
|
|
|
#7 | |||||||||||||||||||||||
|
|
Great!!! Last question: in the code above, how to get the type (VIEW, TABLE, etc.) of a table? Is this possible using DAO? Many thanks. |
|||||||||||||||||||||||
|
Local Time: 09:09 PM
Local Date: 05-20-2013 |
|
|
|
#8 | |||||||||||||||||||||||
|
|
I would just like to mention that if you DO use ADO and DAO in the same project its very important to fully qualify everything. eg NOT As this will cause problems! Aside from that as far as i know there are no other problems. "From the ashes of disaster grow the roses of success" - Chitty chitty bang bang "I fear not the man who has 10,000 kicks practiced once. I fear the man who has 1 kick practiced 10,000 times" - Bruce Lee |
|||||||||||||||||||||||
|
Local Time: 12:09 AM
Local Date: 05-21-2013 |
|
![]() |
| Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|


