Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 38
  1. #16
    Mathurin is offline Novice
    Windows 11 Access 2019
    Join Date
    Nov 2024
    Posts
    20
    Bonjour Dave, j'ai essayé avec les champs ID_INDIVIDU,ID_PERE,ID_MERE, ID_CONJOINT et la répone: Echec lors de la conversion de type listeind$_Erreurs d'importation

    Jean

  2. #17
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,739
    Looking at the Excel file, those 4 fields are not numeric. Each column's values are prefixed with "I", so it is not possible to import them as numeric.

  3. #18
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,739
    Here's a solution.
    1. Import the Excel, allowing the fields to import as text into Access.
    2. Then run this query to remove the leading "I" in the four columns:

    Code:
    UPDATE Listeind SET Listeind.ID_INDIVIDU = Replace(Nz([ID_INDIVIDU],""),"I",""), Listeind.ID_PERE = Replace(Nz([ID_PERE],""),"I",""), Listeind.ID_MERE = Replace(Nz([ID_MERE],""),"I",""), Listeind.CONJOINT = Replace(Nz([CONJOINT],""),"I","");
    3. Open table Listeind in design view and change the four fields to Number, Long Integer.
    4. Change SEXE from double to Integer.

  4. #19
    Mathurin is offline Novice
    Windows 11 Access 2019
    Join Date
    Nov 2024
    Posts
    20
    Bonjour Dave, Je suis réellement vert avec Access. J'ai importe la table tel que article 1 J'ai ensuite ouvert création de requete mais jew ne vois pas ou inscrire la formule

  5. #20
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,739
    The process to create query from SQL string:
    Step 1
    Click image for larger version. 

Name:	MatStep1.png 
Views:	16 
Size:	32.3 KB 
ID:	52450

    Step 2
    Click image for larger version. 

Name:	MatStep2.png 
Views:	15 
Size:	55.7 KB 
ID:	52451

    Step 3
    Click image for larger version. 

Name:	MatStep3.jpg 
Views:	14 
Size:	38.5 KB 
ID:	52452

    Step 4
    Click image for larger version. 

Name:	MatStep4.png 
Views:	14 
Size:	36.7 KB 
ID:	52453

    Result
    Click image for larger version. 

Name:	MatStep5.jpg 
Views:	17 
Size:	91.4 KB 
ID:	52454

  6. #21
    Mathurin is offline Novice
    Windows 11 Access 2019
    Join Date
    Nov 2024
    Posts
    20
    Bonjour Dave, tu es une personne formidable. Merci de ton aide si précieuse. Tu es mon Mentor

  7. #22
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,739
    Formidable? Indeed. Different nuance in French and English.
    Glad to help. Good luck with the project.

  8. #23
    Mathurin is offline Novice
    Windows 11 Access 2019
    Join Date
    Nov 2024
    Posts
    20
    Bonjour Dave,

    Je tente avec une nouvelle table Listeind et j'ai le message Fonction''Remplacer'' non définie dans l'expression

    UPDATE Listeind SET Listeind.ID_INDIVIDU = Remplacer(Nz([ID_INDIVIDU],""),"I",""), Listeind.ID_PERE = Remplacer(Nz([ID_PERE],""),"I","") , Listeind.ID_MERE = Remplacer(Nz([ID_MERE],""),"I",""), Listeind.CONJOINT = Remplacer(Nz([CONJOINT],""),"I","");

  9. #24
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,739
    I think you must spell it exactly REPLACE, not translated.

  10. #25
    Mathurin is offline Novice
    Windows 11 Access 2019
    Join Date
    Nov 2024
    Posts
    20
    Merci, cela a fonctionné

  11. #26
    Mathurin is offline Novice
    Windows 11 Access 2019
    Join Date
    Nov 2024
    Posts
    20
    Probleme réglé pour type texte vers nombre.Mais comment transformer une date au format texte en format date ?

    Merci de votre aide

  12. #27
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,739
    Use the CDate function.
    This is a basic VBA question that would easily and much more quickly be answered by a Google search rather than waiting for turnaround at this site.
    Do you not have Google in France?

  13. #28
    Mathurin is offline Novice
    Windows 11 Access 2019
    Join Date
    Nov 2024
    Posts
    20
    Pour information, je suis du Québec.C'est la premiere chose que j'ai fait, aller sur Googleet les résultats sans succes.Le fichier provient d'un fichier Gedcom du base de logiciel généalogique qui a été lu par Oxy-Gene, converti en fichier .CSV, transformé en fichier Excel et importer dans Access.Je vais essayer avec CDate

  14. #29
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2021
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,739
    It took only a few seconds to get this search result:

    Click image for larger version. 

Name:	convert.jpg 
Views:	13 
Size:	209.8 KB 
ID:	52465

  15. #30
    Mathurin is offline Novice
    Windows 11 Access 2019
    Join Date
    Nov 2024
    Posts
    20
    Merci, je vais essayer

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access 2003: import csv fails as csv is still open
    By vanthien in forum Import/Export Data
    Replies: 3
    Last Post: 01-06-2013, 07:46 PM
  2. SendObject Export CSV and Import CSV
    By DetrieZ in forum Import/Export Data
    Replies: 2
    Last Post: 09-19-2012, 04:52 PM
  3. Macro To Import CSV to ACCESS
    By csvivek in forum Import/Export Data
    Replies: 1
    Last Post: 12-07-2009, 01:49 PM
  4. Importing Xls and CSV files into MS Access
    By Jeff in forum Import/Export Data
    Replies: 1
    Last Post: 02-17-2009, 11:56 PM
  5. CSV File Import
    By compasst in forum Import/Export Data
    Replies: 3
    Last Post: 03-31-2006, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums