Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Updating Splash Screen During Data Import Process

Posted on 2011-03-24
3
Medium Priority
?
257 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 49

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 49

Accepted Solution

by:
Dale Fye earned 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

916 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