Need Progress Bar while importing Data from text file

JasonBoyd

New Member
Hey Everyone,

I'm learning Visual Basic from the Microsoft help files, but I'm kindof stumped. I am using only Microsoft Access.

I import a txt file called Payroll.txt into a table called tblPayroll. The import works great, but I'd like to show a Progress Bar in the form so the user knows that it is doing something.

The code executes when I click the cmdImportPayrollDownload command button on my form.

Here is my code so far. Can someone tell me what I need to do to add a progress bar to this form?

Private Sub cmdImportPayrollDownload_Click()
On Error GoTo Err_cmdImportPayrollDownload_Click

DoCmd.SetWarnings False
Screen.MousePointer = 11
DoCmd.TransferText acImportDelim, "Payroll_ImportSpec", "tblPayroll", "\\09cic--w77mtk01\Data Security Database\Data\payroll.txt", False
Screen.MousePointer = 0
DoCmd.SetWarnings True
MsgBox "The payroll download has been imported successfully.", vbOKOnly, "Import Complete"
DoCmd.Close acForm, Me.Name, acSaveNo

Exit_cmdImportPayrollDownload_Click:
Exit Sub

Err_cmdImportPayrollDownload_Click:
MsgBox Err.Description
Resume Exit_cmdImportPayrollDownload_Click
End Sub

Thanks,
Jason Boyd
 

jongpau

Member
Hi Jason,

Aren't you on the completely wrong list/forum with this question (this being ProgressTalk and not VBTalk :awink: )?
 
Top