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

access to php mysql

P: 3
i can able to retrive the access file and show it in the OLE box, but by double clicking it the access window is opening. But i just want to retrive only the table names from that, and show it in the list box.
Nov 3 '06 #1
Share this Question
Share on Google+
1 Reply


100+
P: 267
hi
create a form with a datacontrol (Data1) and a Listbox (List1)
set property OLEDragMode to Automatic and OLEDropMode to Manual
copy & paste next code

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim vFN As Variant
  3. Dim dbTab As TableDef
  4.  
  5. Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  6. If Data.GetFormat(vbCFFiles) Then
  7.     For Each vFN In Data.Files
  8.     Data1.DatabaseName = vFN
  9.     Data1.Refresh
  10.         For Each dbTab In Data1.Database.TableDefs
  11.         List1.AddItem dbTab.Name
  12.         Next Td
  13.     Next vFN
  14. End If
  15. End Sub
  16.  
  17. Private Sub List1_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  18. If Data.GetFormat(vbCFFiles) Then
  19. List1.Clear
  20.     Effect = vbDropEffectCopy And Effect
  21.     Exit Sub
  22. End If
  23. Effect = vbDropEffectNone
  24. End Sub
  25.  
  26.  
Nov 5 '06 #2

Post your reply

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