473,320 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Upadting QueryTable in access 2010 using vba code

Hi,

I have a querytable in my database and I want to update the querytable using VBA code. I am confused with how to connect to the querytable and basically refresh it.

Thanks in advance.
Oct 18 '13 #1
4 1812
zmbd
5,501 Expert Mod 4TB
akjandu:
Queries are not Tables. They are a view of an underlying table. Anything that you do in the table, or in the query, will normally alter the table. The query will reflect that once it is re-ran. MS Access 2010 Tutorials

If you have a form based on a query, then the changes made by the user in the form happen IRL. If you have made changes via code, or if in a multi-user environment, you may need to issue a "requery" - this can be done in a few ways such as the DoCmd.Requery or (the way I tend to do this) is the control.requery so in a form I would use me.requery
Oct 23 '13 #2
Rabbit
12,516 Expert Mod 8TB
I believe they may be talking about an Excel QueryTable. The Excel QueryTable object has a refresh method.
Oct 23 '13 #3
zmbd
5,501 Expert Mod 4TB
Rabbit you may very well be correct (and usually are (^-^))
however:
I have a querytable in my database and I want
Was what I based my reply on.
In either case, as you noted or as I was attempting to point out, the refresh/requiry method will update the query results.
Oct 23 '13 #4
Thanks. Your method worked.
@zmbd
Oct 25 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Wayne | last post by:
Is there a way to determine the macro security level in Access 2003 using code? Any help is appreciated.
5
by: mhifd009 | last post by:
I have just come back to coding after a break of 12 months, as you know remebering wat u knew can be hard, i created a macro or code that compressed another database (renamed to temp, then copied...
5
by: jaad | last post by:
Hello, I have a database that was written in access 2007 on my pc. I wanted to work off site with the database so I uploaded it onto my laptop which is loaded with access 2010 beta. When I...
1
by: Alan Yim | last post by:
Hi folks, My company recently upgraded our Office suite from 2003 to 2010. The problem in particular is with an Access database that was originally designed in Access 2003. The code in question...
2
by: Peter Argast | last post by:
I've seen a lot of similar comments on this problem on various forums and most threads end with no resolution but I suspect the answer is simple enough though I've yet to find it. I can add any...
4
by: jbrumbau | last post by:
Hello, In Access 2010/2007, how do you prevent users from flipping into design view from the ribbon? I do not want to hide the entire ribbon (DoCmd.ShowToolbar "Ribbon", acToolbarNo) or even the...
4
beacon
by: beacon | last post by:
Hi everybody, My title may not exactly describe my issue, so please forgive my lack of creativity today. I've got a database that was created in Access 2003 that I've opened in Access 2010. I...
10
by: Corwin Moyne | last post by:
Hi there. I'm a complete noob when it comes to VBA. I have some code that I got online to send an email using Outlook through Access 2010. The code works by displaying an Outlook message window, but...
2
by: Redbeard | last post by:
I need to save my Access 2010 database in 2003 format so that someone can use it that is only running 2003. My database was built using Access 1997 and has been upgraded over the years to 2003, 2007...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.