Failing to import data to tables

juneau730

Board Regular
Joined
Jun 7, 2018
Messages
80
Hello all,

Recently I have noticed that my dBase has not been importing all data from the excel sheets into the dBase tables. After examining the dBase, the tables and the raw data sheets, I see no reason why it shouldn't be importing.

I was hoping someone here might have an idea why, though the data is available, all appears to be correct, I am getting no errors, debug, etc. that it wouldn't import.
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

JonXL

Active Member
Joined
Feb 5, 2018
Messages
346
Office Version
365, 2016
Platform
Windows
Do you get any import errors?

Is there anything at all consistent about the data not importing (always the same type, field, row number, etc.)? Is the DB getting up there is in size?

Also, how are you importing the data? Your mention of debugging leads me to think it's not through the interface's import menu but by code. Can you post the code?
 

juneau730

Board Regular
Joined
Jun 7, 2018
Messages
80
Hello, sorry for the delay in replying to you, been crazy.

I do not get any import errors of any type, just empty tables.

You are correct, this is not being done directly thru an import function within the dBase. We have various vbscripts that run different routines to pull our data sets. The vbs create the csv files, format them as needed, convert to xlsx, etc.

Yes the dBase size does grow, but I can also clear the tables as needed, which doesn't correct this issue.

The consistency is that the same 2 sometimes 3 tables are blank even though the xlsx has data in it. Normally I can run the vbs a few times and it will eventually import all the data, or I can manually import it, via Import from Excel.
 

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
1,860
to troubleshoot this yourself you need to verify that every sql statement you have in code is valid in its entirety. Thus if there are variables or references that provide criteria (or anything else) you ought to step through and debug.print the sql after the references have been resolved. If all looks good, copy & paste to a new query to test. If it's an action query, I'd switch to datasheet view rather than run it. That way, it will indicate the records that will be updated without actually making any changes. If you have turned warnings off in code you are liking missing the message that would indicate there is an issue. If you are using Execute method of CurrentDb object without dbFailOnError parameter, you will also suppress warnings. Lastly, if there are IF blocks or Select Case blocks, ensure that the conditions they test are always as expected.

Your big problem in all of this is that if the issue is random, it will likely take several executions of your code before anything is revealed.
 

xenou

MrExcel MVP, Moderator
Joined
Mar 2, 2007
Messages
16,676
Office Version
2013
Platform
Windows
Yes the dBase size does grow, but I can also clear the tables as needed, which doesn't correct this issue.
Note that for access it is not enough to "clear tables". You must periodically do a "compact and repair" to free database space (periodically meaning as often as needed - once an hour, once a day, once a week, or once a year...).
 

Watch MrExcel Video

Forum statistics

Threads
1,102,863
Messages
5,489,323
Members
407,686
Latest member
Chuck1960

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top