To complete the connection with a field in the Recordset managed by the Data control, you must also provide the name of a Field object in the DataField property. Unlike the DataField property, the DataSource property setting isn't available at run time.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionet quand tu fais Enter pour valider la saisie d'un nouveau dossier, il récupère en fait le plus proche existant déjà
et quand tu fais Enter pour valider la saisie d'un nouveau dossier, il récupère en fait le plus proche existant déjà
j'ai toujours fait comme s'il n'existait pas car on n'a aucun contrôle dessus (positionnement, taille et contrôle à posteriori
VERSION 5.00 Begin VB.Form Form2 Caption = "Form2" ClientHeight = 3195 ClientLeft = 60 ClientTop = 345 ClientWidth = 4680 LinkTopic = "Form2" ScaleHeight = 3195 ScaleWidth = 4680 StartUpPosition = 3 'Windows Default Begin VB.ComboBox cboFolders Height = 315 Left = 360 TabIndex = 0 Text = "cboFolders" Top = 480 Width = 3975 End End Attribute VB_Name = "Form2" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private P_aSlideFolders() As String ' Array of Folders for SlideShow Private Sub Form_Load() ' Dim oFolders As New BH_CScanDrives Dim strRootFolder As String strRootFolder = "D:\Graphics\Personnal" cboFolders.Clear: ReDim P_aSlideFolders(0) As String cboFolders.AddItem "Choisir dans la liste ci-dessous" ' oFolders.Flags = sfoFoldersOnly + sfoIgnoreGhostFolder ' Do While oFolders.ScanDrive(strRootFolder) ' If oFolders.FileIsMatching Then cboFolders.AddItem 'Le nom du Dossier ici ReDim Preserve P_aSlideFolders(BH_UBound(P_aSlideFolders) + 1) P_aSlideFolders(BH_UBound(P_aSlideFolders)) = 'Le nom du Dossier ici End If Loop cboFolders.ListIndex = 0 End Sub Public Function BH_UBound(SArray As Variant) As Long On Error GoTo EmptyArray BH_UBound = UBound(SArray) Exit Function EmptyArray: BH_UBound = -1 End Function
' oFolders.Flags = sfoFoldersOnly + sfoIgnoreGhostFolder ' Do While oFolders.ScanDrive(strRootFolder) ' If oFolders.FileIsMatching Then cboFolders.AddItem 'Le nom du Dossier ici ReDim Preserve P_aSlideFolders(BH_UBound(P_aSlideFolders) + 1) P_aSlideFolders(BH_UBound(P_aSlideFolders)) = 'Le nom du Dossier ici ' End If ' Loop cboFolders.ListIndex = 0