By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,663 Members | 1,843 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,663 IT Pros & Developers. It's quick & easy.

Access Update & Loop

P: 36
1)
Is there any way to update the data in this table(MSysQueries). I have a bunch of passthrough queries where I need to update the ODBC connection.Instead of updating the properties in each query individually, is there any way to do an update to that data in the MSysQueries table.

I need to update NAME1 Column

Expand|Select|Wrap|Line Numbers
  1. SELECT MSysQueries.Name1
  2. FROM MSysQueries
  3. WHERE (((MSysQueries.Attribute)=1));
  4.  
2)
Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT MSysObjects.Name
  3. FROM MSysObjects
  4. WHERE (((MSysObjects.Type)=5));
  5.  
From above sql i will get list of queries in my MDB file

Assume Output of above query is
abc
xyz
lmn

I have to put the above values 1 by one in below ??
Expand|Select|Wrap|Line Numbers
  1.  
  2. DoCmd.OutputTo acOutputQuery, "??",acFormatXLS, "D:\??"
  3.  
  4. Example
  5.  
  6. DoCmd.OutputTo acOutputQuery, "abc",acFormatXLS, "D:\abc"
  7. DoCmd.OutputTo acOutputQuery, "xyz",acFormatXLS, "D:\xyz"
  8.  
May 18 '09 #1
Share this Question
Share on Google+
4 Replies


NeoPa
Expert Mod 15k+
P: 31,712
If you are able to update the data in this table then surely there is clearly no issue with you writing code to loop through the values returned and outputting the objects whose names are returned.

To be honest I'm not sure what you're asking here. The question makes very little sense as a question.

What do you actually want to know?
May 18 '09 #2

NeoPa
Expert Mod 15k+
P: 31,712
Another question would be :
What are you actually trying to do?

This seems a complicated way of going about finding a list of objects. There are generally better methods for this, depending on exactly what you want of course, which is far from clear.
May 18 '09 #3

P: 36
Sorry to all Problem is now resolved.. Thanks to all
May 19 '09 #4

NeoPa
Expert Mod 15k+
P: 31,712
In case anyone is interested, it seems the answer was found in another (duplicate) thread (How to loop & substitute ???).
May 19 '09 #5

Post your reply

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