Solved

Updating Splash Screen During Data Import Process

Posted on 2011-03-24
3
247 Views
Last Modified: 2012-06-21
Hi Experts,

I have an import process that imports data from tabs in an Excel file.  That works.  But what my client wants is a splash screen saying what tables are being appended to when it's happening.  

If I create a splash screen and call that screen prior to the import process.  How do I get my original window to post to the screen during the import process?  So how do I write to a form from another form?

Thank you ,

Wendee
0
Comment
Question by:pwdells
  • 2
3 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
Use the Load event of the splash screen to run your import process.

Put a label control (lbl_Status) on your splash form and set its visible property to No.

In the Load event of the form, do something like:

Private Sub Form_Load

    Dim strWorkbook as string

    me.visible = true

    me.lbl_Status.Visible = true

    strWorkbook = "C:\somefolder\somefile1.xls"
    me.lbl_Status.Caption = "Importing worksheet:" & strWorkbook
    docmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "tbl_Dest", strWorkbook, true

    strWorkbook = "C:\somefolder\somefile2.xls"
    me.lbl_Status.Caption = "Importing worksheet:" & strWorkbook
    docmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "tbl_Dest", strWorkbook, true
 
    strWorkbook = "C:\somefolder\somefile3.xls"
    me.lbl_Status.Caption = "Importing worksheet:" & strWorkbook
    docmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "tbl_Dest", strWorkbook, true

    me.lbl_Status.visible = false

End Sub
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
Comment Utility
If you really want to code to be in some other form, then use a syntax similar to:

Forms("frm_Splash").lbl_Status.Visible = True
Forms("frm_Splash").lbl_Status.Caption = "Importing worksheet:" & strWorkbook

Dale
0
 

Author Comment

by:pwdells
Comment Utility
I had to find a different solution to this problem.  I will update tonight, when I get home to my personal laptop to post my solution.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now