473,396 Members | 1,992 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,396 software developers and data experts.

Passing trough table

Hi!

I'm looking for a macro, that let me pass trough all rows in table (ID int -
key, string Name) and everytime calls a query with a Name (or ID) as
parameter. I can't find this kind of macro.
I'm using Access 2000.

Greetings
Radek
Nov 12 '05 #1
4 1444
You use the Query Builder to create a Query as you describe. Then you can
execute it either from the Query Builder window, from a macro, or from code.

In the Query Builder, select the Table as a data source, pull down all
fields into the Query Builder grid (a short way to do this is to
double-click the table and then drag the mouse pointer down). Then, under
the field you want to use to select the record, for example, the "ID" field,
in the Criteria line, type "[Enter ID to Select]". When you run the Query,
it will prompt the user to enter the ID.

If, by something else you said, you have a field named "Name", that is not a
good idea. "Name" is an Access reserved word and using it for a field name
can be confusing.

Larry Linson
Microsoft Access MVP
"Radek Michalski" <ra*******@op.pl> wrote in message
news:br**********@news.onet.pl...
Hi!

I'm looking for a macro, that let me pass trough all rows in table (ID int - key, string Name) and everytime calls a query with a Name (or ID) as
parameter. I can't find this kind of macro.
I'm using Access 2000.

Greetings
Radek

Nov 12 '05 #2
Larry Linson wrpte:
You use the Query Builder to create a Query as you describe. Then you
can execute it either from the Query Builder window, from a macro, or
from code.


Hi Larry, thanks for answer.

That's the point, but I want to automate the whole process. I.e. without
prompting for a particular ID system should make some task (run a macro that
runs a query and saves results to another table) giving that macro that ID
as parameter.
So, in other words, I want to pass the whole table by ID field (key) and run
some task for each ID value.

PS: The "Name" field is called in other way in my database.

Greetings
Radek
Nov 12 '05 #3
What you want to do is certainly possible in code, but I doubt you can do
what you want in macros. Where does the code (what you called macro) obtain
the particular ID? It has to come from _somewhere_... unless you just make
one up using the Rnd function.

"Run a query and save results to another table"? That sounds to me as if it
would mean redundant storage of data -- and a violation of relational
database design principles.

Let's begin from the beginning and you tell us what data you have and what
you are trying to accomplish, not just incomplete ideas as to how to do some
unspecified thing. Chances are very high that _someone_ here will have a
useful suggestion.

Larry Linson
Microsoft Access MVP
Larry Linson
Microsoft Access MVP

"Radek Michalski" <ra*******@op.pl> wrote in message
news:br**********@news.onet.pl...
Larry Linson wrpte:
You use the Query Builder to create a Query as you describe. Then you
can execute it either from the Query Builder window, from a macro, or
from code.
Hi Larry, thanks for answer.

That's the point, but I want to automate the whole process. I.e. without
prompting for a particular ID system should make some task (run a macro

that runs a query and saves results to another table) giving that macro that ID
as parameter.
So, in other words, I want to pass the whole table by ID field (key) and run some task for each ID value.

PS: The "Name" field is called in other way in my database.

Greetings
Radek

Nov 12 '05 #4
Larry Linson napisa³:
Let's begin from the beginning and you tell us what data you have and
what you are trying to accomplish, not just incomplete ideas as to
how to do some unspecified thing. Chances are very high that
_someone_ here will have a useful suggestion.


OK, starting from beginning:

The thing I need to do is to split large table containing lots of data to
small tables and export those into new database (each portion goes to each
new database). The split criterium is the ID I told about existing in
another table.
So the necessary steps are:

1) set focus on the first row of a table containing ID and Name1 field
2) using ID or Name1 field query large table looking for data associated
with particular ID/Name1
3) export query results to another database
4) go to next ID
5) repeat steps 1-4 for all IDs in the index table

The new database needs no relations - it would be a mdb file containing only
the query result.

Greetings
Radek
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bawar | last post by:
Hellow, I don't seem to be able to send trough the variable 'language' from my form to the php-variable $language that I want to use in my session... I first tried in the form with a drop down...
1
by: Andrés Giraldo | last post by:
Hi! I'm trying to pass trough all the objects of a form but I have some text inputs in a DIV and I have many DIVs like this on my form. I'm doing something like: for (i = 0; i <...
0
by: Javier de la Torre | last post by:
Hi all, I'm wondering if someone has experiment problems using SQL statements with UNIONS trough the ODBC driver. For example this SQL statement: (SELECT DISTINCT compactes.numplec AS UnitId...
3
by: Antoine Junod | last post by:
Hello, I definitely have a problem to build a clean data structure. I would be very happy if some of you could help me as well as in the past. Here is my problem: -> I have a list of...
0
by: ALMA_J_III | last post by:
Hi, All! My problem: It is necessary to print CR report directly to printer (without preview). For printing I am using Report object. Currently my report has 1 parameter. Can you explain me how...
3
by: Sandra Castellanos | last post by:
I want to know if there is a way to easily iterate trough all the controls contained, say, in a table, including the controls that can be inside the cells and in any nested tables that are inside?...
4
by: Nedim | last post by:
first let me say sorry if this is in the wrong place, i'm pretty new to programming and to be honest i am a bit intimidated by these forums. now that i've got that out of the way, i was bored and...
5
by: Tor Inge Rislaa | last post by:
I have a dataset with a table "Artikler". Before I bind the table to a DataList in my Web Form I want to update the value of each row of the field "PreText" in the table. (I don't want to update...
4
by: Boni | last post by:
I want consuming a webserivce trough a proxy. I use this code. myService s = new myService (); System.Net.WebProxy proxyObject = new System.Net.WebProxy("http://proxyhost:8080"); s.Proxy =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.