Solved

Updating Splash Screen During Data Import Process

Posted on 2011-03-24
3
254 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 48

Expert Comment

by:Dale Fye
ID: 35210355
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 48

Accepted Solution

by:
Dale Fye earned 500 total points
ID: 35210367
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
ID: 35418021
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

623 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