access web app macro to copy data between tables

Posted on 2014-07-31
Medium Priority
Last Modified: 2014-08-09
I need a macro to be able to copy data from one field to another. I tried the attached screen shot but it tosses and error that it cannot connect to the server.

Any suggestions appreciated.
Question by:911bob
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
  • 7
  • 3
  • 2
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40232927
will a simple msgbox macro work?
Just trying to see if this is a connection issue...

If you just keep the micro simple and copy from one field do another (for one record, ...without looping) does it work.

Is "NewRecord" he name of a form?

If this is really a new record you are creating, ...then perhaps the values are not saved to the underlying table yet?

Finally, ..what is the need for doing this, ...perhaps the is a better way...

Author Comment

ID: 40232952
In an Office365 Access web app, there is no append capability. To add data to a table I want to import it as a new table then "copy the data" over to the new table.
[NewRecord] is the alias for the table Cases3
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40233314
Hard to believe that there is no easier way to do this in a web app.

You cannot select the table and copy it, ...then paste it back in?
You cannot create a blank table in SQL, then append data to it? (Run basic SQL commands)...?

Then I am curios as well,... so lets see what other experts say...
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.


Author Comment

ID: 40233658
Found this, but do not see how to what they say.

And the copy paste does not seem to work for web app
LVL 85
ID: 40233824
That article talks about importing data from other sources. You said you want to COPY a table, which indicates both tables are available in the web app. Is that not the case? Is one of the tables in an external database?

Author Comment

ID: 40233881
I am trying to append external data to an existing table..

So I have imported that data into a new table in the web app and now want to copy the records into the existing table. Per the above:

Importing data into an app always creates a new table with default List and Datasheet views.

You can’t append data to existing tables using the Import Wizard in an app. However, you can import data into a new table and then do one of the following:

Use datasheet views to copy and paste the data into the target table, or

Use the CreateRecord action in a data macro to add the imported data to the target table.

I cannot copy and paste the rows in the datasheet view so I want to attempt the Create record action to copy row by row in a macro. That is the macro I have show in the listing
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1000 total points
ID: 40234049
From what I can see,  your macro looks correct. You're calling CreateRecord, and then setting each value.

Only suggestion would be to NOT use an Alias and see if that matters (I doubt it would, but it worth a shot).

Author Comment

ID: 40234720
It seems to run but I get a Action Failed message.. see attached.ActionFailed.JPG

Accepted Solution

911bob earned 0 total points
ID: 40236181
Found the issues:

1) I had forced the dataMacro to run directly. Even though it was not listed in the runMacro I typed it in and tried to force it. I fixed it by creating a "Macro" and then calling the DataMacro from that macro.

2) I had originally put the view with the macro on the first view.. but the source table was not in the view. I moved the calling macro view to the table that was to be imported.

After those 2 steps.. it works..

Thanks for the suggestions.. Getting your head wrapped around the Access Web apps take a little bit different thinking than the desktop node
LVL 85
ID: 40238829
Glad you found the issue. Please be sure to accept your last comment as the solution when closing it out. I'm sure this could save someone a bit of frustration down the road!

Author Comment

ID: 40239470
Thanks for input from everyone,,
Gave Scott some points for pointing me in the right direction..

Author Closing Comment

ID: 40250434
I found the solution myself

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Microsoft is moving in-place eDiscovery & hold from ECP to EOP console under Content Search in Search and Investigation Options.  In this post, I will be showing you how to export emails to a PST file using the Content Search Options.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

770 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