Solved

Temporary table solution for web db

Posted on 2011-09-08
4
368 Views
Last Modified: 2012-05-12
I have created a hybrid Access application, but have the need for a temporary (local) table to exist in each users copy. This table will be used to allow each user to play some "what if" scenarios. By "hybrid Access application", I am talking about an Access application that has been published to SharePoint, but each user runs an Access file locally with the data being stored on SharePoint. This works very nicely allowing users to use native forms instead of dealing with the browser limitations.

Thanks, Dale
0
Comment
Question by:dlogan7
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 36501848
Just add the table to the Access app, and don't publish that to Sharepoint. Or, create the table when the app is opened, and delete it when it's closed.

Here's a good collection of Access DDL functions:
http://allenbrowne.com/func-DDL.html
0
 
LVL 57
ID: 36502036
 Other option is to create a temp DB, create the table in there (number of ways to do that), then kill off the temp DB when your done.

Jim.
0
 

Author Comment

by:dlogan7
ID: 36520007
LSM,

I checked out the solutions at the link you provided. My first thought was that there was no way I could pull that off. I am very weak when it comes to VBA. I attempted the one named: CreateTableDDL. When I ran it i get a user-defined ...error on the very first line:

Dim cmd As New ADODB.Command

Also, I don't think you can NOT publish something to SharePoint. When you sync, it gets everything.

Jim,

<create a temp DB, create the table in there >
Again, that may be over my head. Most of my users for this project are using Acces Runtime and don't have the full version of Access. Would your suggestion be possible then?

Thanks, Dale


 
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 36522483
Dale,

<<<create a temp DB, create the table in there >
Again, that may be over my head. Most of my users for this project are using Acces Runtime and don't have the full version of Access. Would your suggestion be possible then?>>

  Yes.  Here's an example of some VBA that creates a temp DB:

430       pb.SetMessage "Creating scratch database..."

          ' Set the temp database location\name
440       gstrTempDatabaseName = "C:\TravUtilsGLImport.MDB"

          ' Kill the temp database if it exists
450       On Error Resume Next
460       Kill gstrTempDatabaseName
470       On Error GoTo btnVerify_Error

          ' Create temp database
480       Set dbsNew = DBEngine.Workspaces(0).CreateDatabase(gstrTempDatabaseName, dbLangGeneral)

          ' Create table for transactions
490       DoCmd.TransferDatabase acExport, "Microsoft Access", gstrTempDatabaseName, acTable, "tblGLImportData_Template", "tblGLImportData", True

          ' Create errors table
500       DoCmd.TransferDatabase acExport, "Microsoft Access", gstrTempDatabaseName, acTable, "tblGLImportErrors_Template", "tblGLImportErrors", True


It's very stright forward.  Although what LSM suggested would work very well, especially if you added the compact on close option, which would reduce the size of the FE by reclaiming the deleted temp table space.

Jim.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

759 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

22 Experts available now in Live!

Get 1:1 Help Now