hi, i copy this table from internet
and i insert in my table using an array to split the text.
I just noticed that some date are not bold, this is a crucial information that changes everything, could i get if the date is bold or not? i used wel selection from edge (gone now) and now i just select the text and copy.
If you want my procedure you can look here
Code:
Private Sub InsertOCFBtn_Click() Dim arr() As String
Dim Arr2() As String
Dim Soggetto As String
Dim Inizio As Date
Dim Fine As Variant
Dim Counter As Long
Dim Counter2 As Long
DoCmd.SetWarnings False
DoCmd.RunSQL ("DELETE * FROM OCFInserisciDEttaglio")
DoCmd.RunSQL ("Delete * FROM OCFDettaglio WHERE ID =" & Me.ID & "")
arr = Split(Paste_from_Clipboard, Chr(10))
For Counter = LBound(arr) + 1 To UBound(arr)
Debug.Print (Replace(arr(Counter), Chr(13), ""))
Arr2 = Split(Replace(arr(Counter), Chr(13), ""), Chr(9))
For Counter2 = LBound(Arr2) To UBound(Arr2)
Debug.Print (Arr2(Counter2))
Select Case Counter2
Case 0
Soggetto = Arr2(Counter2)
Case 1
Inizio = Format(Arr2(Counter2), "mm/dd/YYYY")
Case 2
Fine = Format(Nz(Arr2(Counter2), "NULL"), "mm/dd/YYYY")
End Select
Next
If IsDate(Fine) Then
DoCmd.RunSQL ("INSERT INTO OcfInserisciDettaglio ( Nome, Cognome, Soggetto, [Data Inizio], [Data Fine],data_nascita,[Data/ora creazione],ID ) VALUES (""" & Me.Nome & """, """ & Me.Cognome & """,""" & Soggetto & """, #" & Inizio & "#, #" & Fine & "#, #" & Me.Data_nascita & "# , #" & Now() & "#, """ & Me.ID & """)")
Else
DoCmd.RunSQL ("INSERT INTO OcfInserisciDettaglio ( Nome, Cognome, Soggetto, [Data Inizio], data_nascita,[Data/ora creazione], ID ) VALUES (""" & Me.Nome & """,""" & Me.Cognome & """,""" & Soggetto & """, #" & Inizio & "#, #" & Me.Data_nascita & "#, #" & Now() & "#, """ & Me.ID & """)")
End If
Next
DoCmd.OpenQuery "qryOcfaggiornaesperienze"
DoCmd.OpenQuery "qryOcfInserisciEsperienze"
DoCmd.SetWarnings True
If CurrentProject.AllForms("lk-ocf_sinossi").IsLoaded Then Forms![LK-ocf_sinossi]!OcfDettaglioSub.Form.Requery
If CurrentProject.AllForms("Contatti").IsLoaded Then Forms!contatti!Candidati!OcfAggiornamenticandidati.Form.Requery
DoCmd.Close
End Sub